Chisel
Chisel is a TCP/UDP-based tunneling tool written in Go that uses HTTP to transport data that is secured using SSH. Chisel can create a client-server connection in a firewall restricted environment.
Last updated
Chisel is a TCP/UDP-based tunneling tool written in Go that uses HTTP to transport data that is secured using SSH. Chisel can create a client-server connection in a firewall restricted environment.
Last updated
IMPORTANT:** We need to be mindful of the size of files we transfer onto targets, not just for performance reasons but also considering detection. Some useful links to proceed:**
Transferring Chisel Binary with SCP, A Web Server, or other methods of choice.
We start a chisel server for a client to connect to.
NOTE: This can be on jump host, kali host, or whichever host we need it for.
Chisel will listen for incoming connections on port 1234 using SOCKS5 (--socks5) and forward it to all the networks that are accessible on the pivot host.
NOTE: we can also run the chisel server on the Kali host.
In the above output, the Chisel client creates a TCP/UDP tunnel via HTTP using SSH between the Chisel server and the client and starts a listener on local port 1080. Now we can modify proxychains.conf and add 1080 port so we can use it to pivot between 1080 and the tunnel.\
Pivoting / Attacking the DC
In the previous example, we transfered a chisel binary to the compromised victim machine and started a listener on port 1234. Commonly, there will be scenarios where firewalls restrict inbound connections to our target. In such cases, we can use Chisel with the reverse tunnel option.
With the Chisel --reverse (-R) enabled, The server (attack host) will listen and accept connections and then be proxied through the client.
Then we connect from the Ubuntu (pivot host) to our attack host, using the option R:socks
NOTE:** Chisel opens a port 1080 **that we will use.
Now we can modify proxychains.conf and add 1080 port so we can use it to pivot between 1080 and the tunnel.
Pivoting / Attacking the DC
If the server we popped a shell on is running phpmyadmin its work portforwarding back to our host.
Navigating to localhost:8090, we can now access the admin portal
Sometimes we may want to port foward a direct port back to our reverse port forward. We can use the syntax: R:localport:remotehost:remoteport.
NOTE: This is useful if we want to access an internal** web service **on our local machine through 127.0.0.1
We may need to upate our /etc/hosts to fit the domain name.