🔮
P4n1cBook
  • 🏴‍☠️Welcome!
    • 🔮P4n1cBook
    • 📚Bookmarks
    • 🚨Licence and Disclaimer
  • Fundamentals
    • Starter Kit
      • Linux
      • PowerShell
      • Git
      • 💾Regex
      • Network Analysis
        • curl
        • tcpdump
        • Nmap
        • 🦈Wireshark
      • Metasploit
    • 🌐Network Protocols
      • ICMP
      • SSH
      • Telnet
      • DNS
      • FTP
      • HTTP/HTTPS
      • SMB
      • SNMP
      • SMTP
      • NFS
      • IPP
      • WinRM
      • LLMNR
      • JDWP
    • Code
      • Python Essentials
      • C & C++
    • Web APIs
      • GraphQL
    • Shells/TTYs
    • Dorks
    • Cryptography
    • Reverse Engineering
      • GDB
      • Binaries
  • Web Exploitation
    • Web Enumeration
      • User Endpoints
      • Web Fuzzing
        • ffuf
        • feroxbuster
        • Gobuster
        • GoWitness
      • Web Servers
        • Apache
        • Nginx
        • Werkzeug
      • Databases
        • MySQL
        • NoSQL
          • MongoDB
          • Redis
      • Web Services/Frameworks
        • Wordpress
        • Laravel
        • Express
        • Magento
        • AIOHTTP
        • HashiCorp Vault
        • Tiny File Manager
        • Joomla
        • CMS Made Simple
        • 🌵Cacti
        • Tomcat
        • Zabbix
        • OpenNetAdmin
        • ImageMagick
    • Vulnerabilities
      • Arbitrary File Read
      • Session Hijacking
      • SSRF
      • Eval Injection
      • Template Manipulation
      • Path Traversal
      • Prototype Pollution
      • XXE
      • Deserialization
      • Log Poisoning
      • Arbitrary Command Execution
      • SQLi
        • SQLmap
      • SSI
      • SSTI
      • LFI
      • XSS
    • Java-based web application
      • Struts
      • .WAR
      • pd4ml.jar
  • Cloud Exploitation
    • Kubernetes
    • AWS
  • Post Exploitation
    • File Transfer
      • Exfiltration
    • Credential Dumping
      • Thunderbird
    • Lateral Movement
    • Persistence
    • Linux Privilege Escalation
      • Static Binaries
      • Enumeration
      • Hijacks
      • Command Injection
      • Jailbreaks
      • Binary Exploitation - Linux
      • Kernel Exploits
      • Buffer Overflow - Linux
      • Docker
      • Abusing Wildcards
  • Wireless Exploitation
    • NFC
Powered by GitBook
On this page
Edit on GitHub
  1. Fundamentals
  2. Reverse Engineering

Binaries

Show the real path
which binary
Display Binary data
cat example | hexdump -C
Understanding ltrace Outputs

The quickest way to get a feel for what a binary is doing is to run it with ltrace, which will print all the library calls it’s making:

ltrace <BINARY> id

UID Checks and Privilege Escalation

  • The setuid(0) function call attempts to set the UID to root. If it succeeds returns 0.

  • A failure (-1) may indicate the program requires elevated permissions to execute certain operations.


Whitelists/Blacklists

  • strncmp or strcmp calls are used to compare input against predefined strings. A return value of -1 indicates a mismatch.

  • strcspn calls are used to check for forbidden characters (e.g., |, &, >, which could be part of command injection attempts).


File Operations and File Descriptors

  • Look for files related to user credentials, configuration, or logs.


External Command Execution

  • Calls to system(), execvp(), or similar functions: These often indicate the program is executing shell commands.

  • Input passed to these commands: If user input directly influences these calls, it might indicate an injection vulnerability.


Signals and Inter-Process Communication

  • Signals like SIGCHLD, SIGSEGV, or SIGKILL in the output.

  • Use of kill() to manage or terminate processes, which can indicate how the program interacts with other processes.

PreviousGDBNextWeb Enumeration

Last updated 2 months ago