Skip to content

413x8/HackingScripts

This branch is 6 commits behind rhergenreder/HackingScripts:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4b02f0b · Feb 24, 2024
Feb 14, 2024
Aug 28, 2020
May 3, 2021
Feb 14, 2024
Feb 14, 2024
Dec 9, 2023
Oct 24, 2023
Sep 13, 2023
Sep 13, 2023
Jan 3, 2022
Dec 9, 2022
Feb 3, 2024
Mar 1, 2022
Feb 14, 2024
Jan 30, 2022
Aug 9, 2020
Mar 1, 2022
Nov 12, 2023
Oct 12, 2020
Feb 14, 2024
Sep 13, 2023
Feb 3, 2024
Oct 27, 2021
Sep 13, 2023
Oct 27, 2023
Dec 9, 2023
Nov 26, 2023
Jan 30, 2022
Dec 9, 2022
May 14, 2021
Sep 13, 2023
Sep 13, 2023
Jan 2, 2023
Feb 14, 2024
Sep 19, 2023
Feb 14, 2024
Feb 14, 2024
Nov 26, 2023
Feb 24, 2024
Dec 11, 2023
Oct 1, 2023
Oct 29, 2023
Feb 24, 2024
May 3, 2021
Feb 14, 2024
Oct 5, 2023
Sep 13, 2023
Feb 3, 2024
Dec 5, 2022
Oct 24, 2023
Feb 14, 2024

Repository files navigation

HackingScripts

This repository contains self-made and common scripts for information gathering, enumeration and more.

What is this?

I use this repository mostly for automated exploit chains. HackTheBox machines often involve steps like spawning a http server, serving a file, extracting content, steal data through custom DNS/FTP/SSH servers, spawning a reverse shell etc. Using this library I implement a script-to-root mechanism to chain all these steps together. Since the repository also includes lots of common payloads and binaries, I didn't want to put it on PyPI. If you got any recommendations for me, feel free to contact me!

Installation

PYTHON_DIR=$(python -c "import sys;print(sys.path[-1])")

# clone directly into python site-packages
git clone https://git.romanh.de/Roman/HackingScripts.git $PYTHON_DIR/hackingscripts
# or use a symlink
git clone https://git.romanh.de/Roman/HackingScripts.git
sudo ln -s $(pwd)/HackingScripts $PYTHON_DIR/hackingscripts

# Install requirements
pip3 install -r $PYTHON_DIR/hackingscripts/requirements.txt

Enumeration: Initial Scans

  • first_scan.sh: Performs initial nmap scan
  • gobuster.sh: Performs gobuster dir scan with raft-large-words-lowercase.txt
  • subdomainFuzz.sh: Fuzzes subdomains for a given domain
  • ssh-check-username.py: Check if user enumeration works for ssh
  • git-dumper.py

Enumeration: Privilege Escalation & Pivoting

  • LinEnum.sh
  • linpeas.sh
  • lse.sh
  • unix-privesc-check.sh
  • uptux.py
  • pspy64
  • portscan.py: small python script, which scans open TCP ports natively with multithread support. Can be deployed on victim machines to scan the intranet.
  • pingscan.py: small python script, which can detect internal hosts via ping probes natively. Can be deployed on victim machines to scan the intranet.
  • deepce.sh: Docker Privilege Escalation (e.g. exposed socket)
  • socat

Reverse Shell: Payloads

Miscellaneous

  • upload_file.py: Starts a local tcp server, for netcat usage
  • xss_handler.py: Starts a local http server and generates xss payload to steal cookies
  • padBuster.pl
  • sql.php: Execute sql queries passed via GET/POST
  • util.py: Collection of some small functions
  • fileserver.py: Create a temporary http server serving in-memory files
  • dnsserver.py: Create a temporary dns server responding dynamically to basic DNS requests (in-memory)
  • sshserver.py: Create a temporary ssh server to intercept credentials (TODO: relay) (in-memory)
  • smtpserver.py: Create a temporary smtp server (in-memory)
  • template.py: Creates a template for web exploits, similar to pwnlib's template
  • pcap_file_extract.py: Lists and extracts files from http connections found in pcap files
  • find_git_commit.py: Compares a local repository (e.g. downloaded from a remote server) with another git repository to guess the commit hash. Useful to find used versions
  • TODO: smb
  • sqli.py: An abstract class for automizing SQL-Injections (WIP)

Example API-Usage

TODO: Add some example code or bash commands on how to use the custom libraries, e.g. fileserver, xss_handler, etc.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 64.8%
  • Shell 25.4%
  • Python 7.2%
  • Batchfile 0.8%
  • Perl 0.7%
  • PHP 0.7%
  • Other 0.4%