✍️
OSCP Prep
  • Welcome Aboard
  • Linux Basics
    • Command Line Fundamentals
  • Writeups
    • HackTheBox
      • Windows
        • Granny
        • Devel
        • Blue
        • Legacy
      • Linux
        • shocker
    • OSPG
    • TryHackMe
    • Vulnhub
      • Kioptrix Level1
  • Scanning and Enumeration
    • Index
    • Wordpress
      • wpscan
    • NMAP
    • DNS
    • NFS
    • DB
      • Oracle DB 1521
      • MySQL
    • SMB
      • msfconsole
      • crackmapexec
      • smbmap
      • smbclient
      • enum4linux
      • Mount smb share locally
    • SSH
    • HTTP
      • PUT Method
      • Untitled
  • Tools and Techniques
    • File Transfer
    • CMD-Fu
    • Cross Platform Exploit Compilation
    • Bash-Fu
    • Sniffing
      • tcpdump
      • Wireshark
    • Brute Force
      • Untitled
      • Hydra
    • Msfvenom
    • Password Cracking
      • John
      • Hashcat
  • Gaining Access and Exploitation
  • SQL Injection
    • sqlmap
    • mysql syntax
    • ms sql syntax
  • File Upload
  • LFI
  • Privilege Escalation
    • Windows
      • references links
      • Manual
        • SeTokenImpersonate
      • Scripts
    • Linux
      • Manual
        • Know your Enemy
      • Scripts
  • Mislu Tips
    • Troubleshooting
  • Buffer OverFlow under 30 min.
    • point n shoot
    • fuzzer.py
    • Addons reading material
  • Active Directory
    • Untitled
Powered by GitBook
On this page

Was this helpful?

  1. Privilege Escalation
  2. Linux
  3. Manual

Know your Enemy

hostname

uname -a

cat /proc/version

cat /etc/issue

lscpu

for arch cpu core threads

what kernel what arch forexploitation

User Enum

whoami

id

sudo -l

history

cat /etc/passwd | grep sh

cat /etc/shadow

cat /etc/group

sudo su -

Network Info

ifconfig

ip a

route

ip route

arp -a

ip neigh

netstat -ona

look for loopback ports and existing open connections

netstat -antup

Look for password key word in files through out the system

grep --color=auto -rnw '/' -ie "PASSWORD" --color=always 2>/dev/null

File Perms and Stored Passwords

look for excessive perms ; can we modify something access something read something write somethings replace something

ls -la /etc/passwd /etc/shadow

normally read perms to passwd files are there and no access to shadow file

both have potential to escalate privs

if passwd file editable then remove the password holder :x: and su into root without password

if shadow is readable ; crack the hashed password

if writeable add new custom user there with custom hashed password

history

cat ~/.bash_history | grep pass

cat ~/.bash_history

find . type f -exec grep -i I "PASSWORD" {} /dev/null \;

grep

copy password findings commands from payload all the things to here

PreviousManualNextScripts

Last updated 3 years ago

Was this helpful?