Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem in getting a connection on public network / WAN #76

Open
ricko2991 opened this issue Sep 28, 2020 · 7 comments
Open

problem in getting a connection on public network / WAN #76

ricko2991 opened this issue Sep 28, 2020 · 7 comments

Comments

@ricko2991
Copy link

Hi, i want to access a connection from a different network by sending a payload containing my ip address. And send using the http port forwarding service, namely LocalXpose, but I don't seem to get a return connection from the target.
Localhost
1

port forwading service
2

Listener
3

I tried the method above and it might not work. So I have to use tcp. So the payload use localxpose port and i as listener use my local port. Okay, This is my problem, when I use the tcp port provided by localxpose. it will also be used as a listener. so how can I switch that listener back to my localhost. The listener should use my local port but i can't change it.

@r00t-3xp10it
Copy link
Owner

@ricko2991
Copy link
Author

ricko2991 commented Sep 29, 2020

Hi, @r00t-3xp10it I have no problem in 1-7 payload categorie payloads when port forwading.
But I have a problem with Amsi evasion, I can't do port forwarding with it

@ricko2991
Copy link
Author

ricko2991 commented Sep 29, 2020

have you tried it and succeeded? Somehow i failed...
can you show host and the port you are using on the payload and also the listeners you used.


Hi, i try this:
2.tcp.ngrok.io:14598 --> localhost:1111

Payload options(ngrok)
LPORT : 14598
LHOST : 13.59.15.185 or LHOST : 2.tcp.ngrok.io

Listen
1º nc -lvp 0.0.0.0 14598 ==> invalid local port 0.0.0.0
2º nc -nlvp 1111 ==> Not connected / nc -lvp 1111 ==> not connected
3º nc -nlvp 14598 ==> not connected
4º nc -s 127.0.0.1 -nlvp 14598 ==> not connected
5º nc -s 127.0.0.1 -nlvp 1111 ==> not connected

@r00t-3xp10it
Copy link
Owner

r00t-3xp10it commented Oct 12, 2020

ok lets try this step by step ...
Check this video for referencie: https://www.youtube.com/watch?v=8YswLITdE7g


1º - ./ngrok tcp 14598
2º - chose venom - amsi evasion agent nº 2
3º - LHOST == 2.tcp.ngrok.io (ngrok)
4º - LPORT == 14598 (ngrok)
5º - goto /var/www/html and port the Agent (Client.ps1) to target machine (manually)
6º - start venom listenner (OpenSSL)
7º - On target machine execute the Client.ps1


Final notes:

Amsi evasion agents require the Apache2 webserver to deliver files to target host ...
so venom users need to port forward the Client.ps1 connection AND the apache2 webserver ..
"But In this exercise we are NOT going to port forward the apache2, just to test if the client connects back to the listenner"..
OpenSSL agents require openssl s_server -quiet -key key.pem -cert cert.pem -port 14598 <-openssl listenner not Netcat

@ricko2991
Copy link
Author

Thank you, now it's working.
And also for example I am using agent no.3 on amsi and it is covered by "hex obfuscation" how do I decode a script covered by hex?

@r00t-3xp10it
Copy link
Owner

r00t-3xp10it commented Oct 13, 2020

the only thing encoded (hex) in agent nº 3 its the ip address ...
This is one attempt to hidde the ip address 'string' from amsi string detection inside Client.ps1 ...
hex


how to decode hex

@ricko2991
Copy link
Author

Thank you 👍

@r00t-3xp10it r00t-3xp10it reopened this Oct 14, 2020
Repository owner deleted a comment from ricko2991 Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants