t3l3machus / Villain

Villain is a high level stage 0/1 C2 framework that can handle multiple TCP socket & HoaxShell-based reverse shells, enhance their functionality with additional features (commands, utilities) and share them among connected sibling servers (Villain instances running on different machines).
Other
3.72k stars 598 forks source link

[Fail] Failed to establish a backdoor session: True. #75

Closed KFriitz closed 1 year ago

KFriitz commented 1 year ago

Hi, It is impossible for me to establish a session with netcat, the reverse shells generated by villain work correctly, but not the basic reverse shells like with netcat.

image

t3l3machus commented 1 year ago

Did you try any other netcat listener based payload?

Also, if able, please edit villain_core.py, comment out this part and try again:
image

let me know what happened if you do, thanks

KFriitz commented 1 year ago

Even commenting out the if condition I get the same result, I tried the same netcat reverse shell with a basic listener and it works, I also tried a linux rev shell with nc on my kali and it works too.

image

With the nc ELF binary :

image

t3l3machus commented 1 year ago

@RkDx I really don't know why, nobody had that issue before. I just checked it right now with a fresh download:

image

t3l3machus commented 1 year ago

Can you provide some info? Windows version etc

KFriitz commented 1 year ago

I just tried on two virtual machines with two different netcats and I have exactly the same result

image

t3l3machus commented 1 year ago

When you commented out the block I showed you did it produce any other error message? Try setting the listener on e.g. port 443 with -n just to see if it behaves the same.

With ELF bin in the screenshot you posted earlier it seems you got a session, was it working? did you run commands through villain?

KFriitz commented 1 year ago

By commenting the IF condition I didn't get any other message, the problem persists even when using a different port and concerning the nc under linux (ELF), the shell works correctly, I get the stdout of the executed commands

t3l3machus commented 1 year ago

@RkDx please, edit this part in villain_core.py:
image

to this:
image

And tell me what error you get, thanks.