alxchk / pupy

OpenSource cross-platform python security toolkit (remote shell)
Other
45 stars 13 forks source link

Questions about modules #15

Closed AlessandroZ closed 6 years ago

AlessandroZ commented 6 years ago

Hi,

I have some questions regarding few modules. If you added it, it may be for a good reason that I cannot see right now. I don't want to modify/delete it, just to understand their goal and when do you use it (for my curiosity).

Thanks a lot to help me better understanding some unclear points.

alxchk commented 6 years ago

usniper

On recent kernel it allows to globally "sniff" values in explicit points in program or library. Example - you can sniff ssh password during copying from one register to another. It will be zeroed immediately after that, so memory dump at arbitrary time will not work. There is no script-kiddy friendly way of using this.

exposed

For debug. To check what is leaked to client

display

Tries to find Xauthority file and available X displays. This can be used to attach to X session from instance which was started from some other context.

alive

Keep-alive thing. Useful when network kills connections without network communication. For example some proxies kill connection if there is no data exchange in 5-10 secs.

AlessandroZ commented 6 years ago

Thanks a lot for your answers. :+1:

usniper

On recent kernel it allows to globally "sniff" values in explicit points in program or library. Example - you can sniff ssh password during copying from one register to another. It will be zeroed immediately after that, so memory dump at arbitrary time will not work. There is no script-kiddy friendly way of using this.

Do you have the name of the function to monitor for ssh creds ? I didn't know this technic. It seems much more stable than backdoring pam.

alxchk commented 6 years ago

I didn't know this technic

This is homemade.. :D

It seems much more stable

It can crash your kernel )

than backdoring pam.

Backdoring for what? In case of password auth plaintext password stored in sshd anyway. You can use hashmon to find it ^^

Do you have the name of the function to monitor for ssh creds ?

It's a bit harder. I'll try to record a short video (or some screenshots) for you, in case you are interested in ^^

alxchk commented 6 years ago

https://asciinema.org/a/3JG9XmYsxseHP5GOzpcrEnWUF

AlessandroZ commented 6 years ago

Awesome, very cool and very interesting technique. Thanks a lot !!!!