Skip to content

Commit

Permalink
Merge branch 'main' of github.com:hackerschoice/bpfhacks
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyperTHC committed Nov 15, 2023
2 parents 7147211 + 3a22038 commit 2d70b41
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# eBPF tools

A (short) collecton of eBPF enabled tools (needs root privileges to run);
A (short) collecton of eBPF enabled tools (need root privileges to run);

Prerequisite: Install the latest bpftrace tool:
```sh
```console
curl -o bpftrace -fsSL https://github.com/iovisor/bpftrace/releases/latest/download/bpftrace
chmod 755 bpftrace
```

## Sniff all ssh/login/xterm session:

This tools records all PTY sessions and sniffs all ssh/sudo/su passwords of all users.
Record all PTY sessions and sniffs all ssh/sudo/su passwords of all users.

```
./bpftrace -B none ptysnoop.bt
```console
export BPFTRACE_STRLEN=200
./bpftrace -Bnone ptysnoop.bt
```
<p align="center">
<img width="675" alt="ptysnoop" src="https://github.com/hackerschoice/bpfhacks/assets/5938498/de068ae5-9cea-44fc-83a6-56e4d37dee93">
</p>

Tools by others: [SSHLog](https://ebpf.io/applications/#sshlog).

0 comments on commit 2d70b41

Please sign in to comment.