Hacking Articles Tips Tricks Videos Tutorials
468 subscribers
65.9K photos
15 videos
157 files
132K links
Exploit
Pentesting
Hacking
Red Team
Blue Team
Kali Linux
Bug Bounty
Black Hat
Cyber security etc

@Hacking_Video
@Hacking_attack
Download Telegram
Methodology of Subdomain Takeover for Beginners

Hello Hackers, This is Abhay Vishwakarma and Today I am here with a awsome medium writeup.Continue reading on Medium »
Read more...
Hacking Articles Tips Tricks Videos Tutorials
Photo
KitPloit - PenTest Tools!
Pamspy - Credentials Dumper For Linux Using eBPF

https://blogger.googleusercontent.com/img/a/AVvXsEh630pwXroI0REuPFjnkP3e1xi4NBs92ScdIQ8WoIiyYGgfd2PjTMB-Gb4WKGasgXeSlrj_0V-7ALK55nPcGEE9F-up_HhV9zilOjx1xPSNWd-zP5kPyuYR51YHhClJGxdvR5TMwK0wWzG1Y6U77oZoM2nZyoEgvIfxAVK2RVsKV3hImD8IR8XT-SMd=w640-h360 pamspyleverage eBPF technologies to achieve an equivalent work of 3snake.

It will track a particular userland function inside the PAM (Pluggable Authentication Modules) library, used by many critical applications to handle authentication like:

* sudo
* sshd
* passwd
* gnome
* x11
* and many other ... How to launch?pamspyis built as a static binary without any dependencies, and available on the release page. Usage: pamspy [OPTION...]
pamspy

Uses eBPF to dump secrets use by PAM (Authentication) module
By hooking the pam_get_authtok function in libpam.so

USAGE: ./pamspy -p $(/usr/sbin/ldconfig -p | grep libpam.so | cut -d ' ' -f4) -d /var/log/trace.0

-d, --daemon=PATH TO OUTPUT CREDENTIALS
Start pamspy in daemon mode and output in the file
passed as argument
-p, --path=PATH Path to the libpam.so file
-r, --print-headers Print headers of the program
-v, --verbose Verbose mode
-?, --help Give this help list
--usage Give a short usage message
-V, --version Print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

Report bugs to .
As pamspyrely on libpam, we have to set the path where libpam is installed on your distribution. To find where libpam is installed you can run the following command : > /usr/sbin/ldconfig -p | grep libpam.so | cut -d ' ' -f4
/lib/x86_64-linux-gnu/libpam.so.0
Once you get the path you can launch pamspy: > ./pamspy -p /lib/x86_64-linux-gnu/libpam.so.0 An easy way to launch pamspyis to use the following command : > ./pamspy -p $(/usr/sbin/ldconfig -p | grep libpam.so | cut -d ' ' -f4) pamspycan also be started as a daemon by providing an output file where credentials will be written: ./pamspy -p $(/usr/sbin/ldconfig -p | grep libpam.so | cut -d ' ' -f4) -d /tmp/credentials How to build?To build the static binary, we need third-party program. For eBPF we need clangto compile the C code into eBPF CO-RE code. We also rely on bpftoolto create a skeleton from ebpf program to include it in our userland program. Then we need also libelfto find the correct symbol in libpam. sudo apt install make clang-11 gcc libelf-dev bpftool Then just build! git clone https://github.com/citronneur/pamspy --recursive
cd pamspy/src
make
How does It works?pamspywill load a userland return probe eBPF program to hook the pam_get_authtokfunction from libpam.so. PAM stands for "Pluggable Authentication Modules", and have a flexible design to manage a different kind of authentication on Linux.

Each time an authentication process tries to check a new user, It will call pam_get_authtok, and will be here to dump the content of the critical secrets!

Easy! Enjoy! Credits and referencesThanks to @blendin for 3snake tool !!! Download Pamspy

___________________________
@hacking_Attack
@Hacking_Video
pamspy leverage eBPF technologies to achieve an equivalent work of 3snake (https://github.com/blendin/3snake). It will track a particular userland (https://www.kitploit.com/search/label/UserLAnd) function inside the PAM (Pluggable Authentication (https://www.kitploit.com/search/label/Authentication) Modules) library, used by many critical applications to handle authentication like: sudo sshd passwd gnome x11 and many other ...
How to launch? pamspy is built as a static binary without any dependencies, and available on the release (https://github.com/citronneur/pamspy/releases/) page. Usage: pamspy [OPTION...]
pamspy

Uses eBPF to dump secrets use by PAM (Authentication) module
By hooking (https://www.kitploit.com/search/label/Hooking) the pam_get_authtok function in libpam.so

USAGE: ./pamspy -p $(/usr/sbin/ldconfig -p | grep libpam.so | cut -d ' ' -f4) -d /var/log/trace.0

-d, --daemon=PATH TO OUTPUT CREDENTIALS
Start pamspy in daemon mode and output in the file
passed as argument
-p, --path=PATH Path to the libpam.so file
-r, --print-headers Print headers (https://www.kitploit.com/search/label/Headers) of the program
-v, --verbose Verbose mode
-?, --help Give this help list
--usage Give a short usage message
-V, --version Print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

Report bugs to .

As pamspy rely on libpam, we have to set the path where libpam is installed on your distribution. To find where libpam is installed you can run the following command : > /usr/sbin/ldconfig -p | grep libpam.so | cut -d ' ' -f4
/lib/x86_64-linux-gnu/libpam.so.0
Once you get the path you can launch pamspy : > ./pamspy -p /lib/x86_64-linux-gnu/libpam.so.0
An easy way to launch pamspy is to use the following command : > ./pamspy -p $(/usr/sbin/ldconfig -p | grep libpam.so | cut -d ' ' -f4)
pamspy can also be started as a daemon by providing an output file where credentials will be written: ./pamspy -p $(/usr/sbin/ldconfig -p | grep libpam.so | cut -d ' ' -f4) -d /tmp/credentials
How to build? To build the static binary, we need third-party program. For eBPF we need clang to compile the C code into eBPF CO-RE code. We also rely on bpftool to create a skeleton from ebpf program to include it in our userland program. Then we need also libelf to find the correct symbol in libpam. sudo apt install make clang-11 gcc libelf-dev bpftool
Then just build! git clone https://github.com/citronneur/pamspy --recursive
cd pamspy/src
make
How does It works? pamspy will load a userland return probe eBPF program to hook the pam_get_authtok function from libpam.so. PAM stands for "Pluggable Authentication Modules", and have a flexible design to manage a different kind of authentication on Linux. Each time an authentication process tries to check a new user, It will call pam_get_authtok, and will be here to dump the content of the critical secrets! Easy! Enjoy! Credits and references Thanks to @blendin for 3snake tool !!!

Download Pamspy (https://github.com/citronneur/pamspy)

___________________________
@hacking_Attack
@Hacking_Video
start your hacking carrier here part 1

we have launched a series of content on how to start hacking from zeroContinue reading on Medium »
Read more...