Hack$Notes
  • Hack$Notes
  • Enumeration
    • NMAP Scanning
    • Hping3 Scanning
      • IDLE SCAN
    • DNS Enum
    • SMB Enum
    • SMTP Enum
    • POP3
    • SNMP Enum
    • LDAP Enum
    • HTTP Enum
      • CheckList
    • FTP Enum
    • SSH Enum
    • MySQL Enum
    • Oracle Enum
    • NFS Enum
    • Internet Relay Chat (IRC)
    • Telnet
    • Kerberos
    • Finger
    • Ports Open/Close
    • ident
    • Postgresl
  • Transferring Files
  • Metasploit Framework
    • Msfvenom tutorial
    • Msfvenom Payloads
  • Reverse Shells
  • Buffer Overflow
    • B.O Steps
    • SLmail B.O
  • Spawning a Shell
  • Password Attacks
    • Passing the Hash
    • SAM/SYSTEM
    • Passwords
    • Hydra
    • Medusa
    • Ncrack
    • Unshadow
    • Hashcat
    • John The Ripper
    • fcrackzip
  • Privilege Escalation
    • Windows
      • Kernel Exploits
      • Stored Credentials
      • Unquoted Service Path
      • Always Install Elevated
      • Weak Permissions
      • Schedule Tasks
      • AutoRun Executables
      • Startup Apps
      • Passwords
      • Win PrivEsc Tools
    • Linux
      • Kernel Exploits
      • Service Exploits
      • PATH Variable
      • SUID/GUID files
      • CronJobs
      • Sudo
      • Custom Executable
      • Linux PrivEsc Tools
  • Port Forwarding
  • Tools / Techniques
    • General Check List
    • Misc. Commands
    • Steganography
    • Evasion Techniques
    • SQL Injection Payloads
    • LFI / RFI
    • Recover contents
    • JAR Files
    • Strace/Ltrace
    • Port Knocking
    • Screenshots in Kali
    • Curl
  • Resources
    • Books
    • Links
Powered by GitBook
On this page

Was this helpful?

  1. Tools / Techniques

Misc. Commands

Miscellaneous Commands

Decode base64/58

echo -n ........base64here........ | base64 -d
echo -n ........base64here........ | base58 -d

Windows hidden files

dir /a     ---> should show hidden folders.
dir /a:d  ---> shows all directories.
dir /a:h  ---> shows all hidden files.

PWD command for Windows

<?php
echo shell_exec("echo %cd%");
?>

shell_exec() VS system() VS exec()

shell_exec — Execute command via shell and return the complete output as a string
system     — Execute an external program and display the output
exec       — Execute an external program

# More info here:
https://www.php.net/manual/en/function.exec.php 
https://www.php.net/manual/en/function.system.php
https://www.php.net/manual/en/function.shell-exec.php

List VHD with 7z

7z l filename.vhd

Use PSExec to login to the target.

Located in:
/usr/share/doc/python-impacket/examples/psexec.py

Execute:
python psexec.py administrator@10.10.10.10

Use Evil-Winrm to login to the target

ruby evil-winrm.rb -i 10.10.10.10 -u username -p 'password_here'

Database dump

sqlite3 name_of_the_db.db .dump

Setting PATH

export PATH="/bin:/sbin:/usr/bin:/usr/sbin:$PATH"
PreviousGeneral Check ListNextSteganography

Last updated 3 years ago

Was this helpful?