DEV Community

Cover image for Cloudflare Warp Team Enrollment Hacking on Ubuntu
criskell for Woovi

Posted on

Cloudflare Warp Team Enrollment Hacking on Ubuntu

We use CloudFlare ZeroTrust policies extensively at Woovi to protect our applications.

Cloudflare WARP is a client that allows you to apply Zero Trust policies that verify that a device is secure before it connects to applications.

However, we have encountered issues when using it on Ubuntu 22.04. The system tray icon doesn't work, and the CLI cannot seamlessly integrate with the authentication page in the browser. Let's address these issues.

Firstly, to connect to WARP on Ubuntu, you need to download the CLI of Warp:

# Add cloudflare gpg key
curl https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg

# Add this repo to your apt repositories
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list

# Install
sudo apt-get update && sudo apt-get install cloudflare-warp
Enter fullscreen mode Exit fullscreen mode

Join your team with warp-cli teams-enroll <your-team-name>.

Press the button on the page that will open. If you receive a response, then everything is ok.

But if nothing happens, follow the steps below.

The challenge is to get the token from this page, which has a maximum time of 30s, and register it as quickly as possible using the following command:

warp-cli delete && warp-cli teams-enroll-token com.cloudflare.warp://woovi.cloudflareaccess.com/auth?token=<TOKEN HERE>
Enter fullscreen mode Exit fullscreen mode

You need to dig through the page's HTML and find the token quickly.

To obtain a new token, run the team enrollment command again: warp-cli delete && warp-cli teams-enroll <team-name>

Inside the devtools console, you can use this script that will insert the necessary token command into your clipboard

copy("warp-cli delete && warp-cli teams-enroll-token " + document.querySelector("#redirect-button").getAttribute("onclick").split("'")[1]);
Enter fullscreen mode Exit fullscreen mode

When you get the command, go back to the terminal and quickly paste it.

Don't forget to connect to WARP:

warp-cli connect
Enter fullscreen mode Exit fullscreen mode

Woovi
Woovi is a Startup that enables shoppers to pay as they like. To make this possible, Woovi provides instant payment solutions for merchants to accept orders.

If you want to work with us, we are hiring!

Top comments (0)