# Web Server Pivoting with Rpivot

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FN79UsoAtp17fqOKepVW1%2Fimage.png?alt=media&#x26;token=7c1687d4-8932-46f2-9b0b-c9fb5a490ebd" alt=""><figcaption></figcaption></figure>

```
ssh ubuntu@10.129.78.39
```

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FnPhyOwAwULjCzvwcRXAR%2Fimage.png?alt=media&#x26;token=1edd641a-9836-4545-b62d-fb5b38b95876" alt=""><figcaption></figcaption></figure>

First we have to transfer the rpivot file in the pivot machine from attack machine

```
scp -r rpivot/ ubuntu@10.129.78.39:/tmp
```

Then we will open our server from attack machine

```
python2.7 server.py --proxy-port 9050 --server-port 9999 --server-ip 0.0.0.0
```

Then we will connect the pivot machine to it

```
python2.7 client.py --server-ip 10.10.14.199 --server-port 9999
```

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2F56zZygfOlbslbYB2Kcwm%2Fimage.png?alt=media&#x26;token=dd98f608-92bc-4b68-8623-7b574702ae8d" alt=""><figcaption></figcaption></figure>

```
sudo subl /usr/local/etc/proxychains.conf
```

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FRT3djNywVZSB4e5qmCd6%2Fimage.png?alt=media&#x26;token=21f34e00-d565-49f6-99a9-f6e0e75ed69c" alt=""><figcaption></figcaption></figure>

```
cd ~/proxychains
./proxychains4 firefox 172.16.5.135:80
```

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2FpnqII03xP7rr1c8T3vOE%2Fimage.png?alt=media&#x26;token=a5a59dd8-991b-4055-8e9c-c28e6a761460" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3402520177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6s691pQpzN41rNo5Bip4%2Fuploads%2Fr9nBDnB3SDc9zDEe1jbF%2Fimage.png?alt=media&#x26;token=dfc646c1-a9a7-4963-8d8a-5268583df433" alt=""><figcaption></figcaption></figure>
