Skip to main content

Hack Me

Python Linux GitHub license

A collection of scripts that implement different network attacks. For informational purposes only.

Any contributor to this project doesn't take any responsibility for illegal usage of any script from this project.

Installation and Usage

The tested environment:

  • Python v3.10
  • Ubuntu 22.04 LTS

Make sure that python3-scapy is installed on your system: sudo apt-get install python3-scapy

You can either run hackmeapp.py from a checkout of the code, or install it like any other python project. Keep in mind that a lot of scripts here can be executed only with the root privileges, so you need to run it with sudo.

$ sudo pip3 install hackme
$ sudo hackme
usage: hackmeapp.py [-h] [--debug] {attack} ...

To enter the debug mode, use the --debug option after the hackme command.

To get the attack description in the terminal, enter hackme <attack> --desc

Implemented Attacks

The following commands include the --debug option, which is not required to execute an attack.

ARP Spoofing

You can read about ARP spoofing attack here.

Example usage:

$ sudo hackme --debug arpspoof -i wlp2s0 -m aa:aa:aa:aa:aa:aa -gm BB-BB-BB-BB-BB-BB -gip 192.168.0.1 -vm cc:cc:cc:cc:cc:cc -vip 192.168.0.108

where:

  • wlp2s0 — your network interface
  • aa:aa:aa:aa:aa:aa — the interface MAC-address (can be written as AA:AA:AA:AA:AA:AA, AA-AA-AA-AA-AA-AA and aa-aa-aa-aa-aa-aa)
  • bb:bb:bb:bb:bb:bb — the gateway's MAC-address
  • 192.168.0.1 — the gateway's IP-address
  • cc:cc:cc:cc:cc:cc — the victim's MAC-address
  • 192.168.0.108 — the victim's IP-address

Run sudo hackme arpspoof --help to get more information.

SYN Flood

You can read about SYN flood attack here.

Example usage:

$ sudo hackme --debug synflood -d 172.17.17.10 -p 443 -c 1000

where:

  • 172.17.17.10 — server's IP-address
  • 443 — server's port
  • 1000 — the number of packets to be sent

Run sudo hackme synflood --help to get more information.

UDP Flood

You can read about UDP flood attack here.

Example usage:

$ sudo hackme --debug udpflood -d 172.17.17.10 -p 53 -c 1000

where:

  • 172.17.17.10 — server's IP-address
  • 53 — server's port
  • 1000 — the number of packets to be sent

Run sudo hackme udpflood --help to get more information.

MAC Flood

You can read about MAC flood attack here.

Example usage:

$ sudo hackme --debug macflood -i wlp2s0 -vm "aa:aa:aa:aa:aa:aa" -c 100000

where:

  • wlp2s0 — your network interface
  • aa:aa:aa:aa:aa:aa — the victim's MAC-address (can be written as AA:AA:AA:AA:AA:AA, AA-AA-AA-AA-AA-AA and aa-aa-aa-aa-aa-aa)
  • 100000 — the number of packets to be sent

Run sudo hackme macflood --help to get more information.

BPDU Spoofing

On a Layer 2 network, switches running STP, RSTP, MSTP, or VBST exchange BPDUs to calculate a spanning tree and trim the network into a loop-free tree topology. If forged BPDUs are sent to attack a device with edge ports and received by them, the device will automatically change the edge ports to non-edge ports and recalculate the spanning tree. If the bridge priority in the BPDUs sent by an attacker is higher than the priority of the root bridge, the network topology will change, thereby interrupting service traffic.

Example usage:

sudo ./hackmeapp.py --debug stpspoof -i wlp2s0 -smac "aa:aa:aa:aa:aa:aa" -dmac "bb:bb:bb:bb:bb:bb" -p 4096
  • wlp2s0 — your network interface
  • aa:aa:aa:aa:aa:aa — your MAC-address
  • bb:bb:bb:bb:bb:bb — victim switch's MAC-address
  • 4096 — priority for choosing the root switch (the lower the number, the higher the priority, so make sure it's low enough to become the root). Must be divisible by 4096

Metadata

Release files for hackme 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hackme 1.0.0
File Size Uploaded Provenance Actions
hackme-1.0.0.tar.gz 24.0 kB Without provenance Details for hackme-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hackme 1.0.0
File Interpreter ABI Platform Actions
hackme-1.0.0-py3-none-any.whl Python 3 none any Details for hackme-1.0.0-py3-none-any.whl

Total release size: 54.3 kB

Release files / hackme-1.0.0.tar.gz

Download URL hackme-1.0.0.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ab46a13b1c4635d87b53612e48e10cc03c921b90ada2aa58c3ff0ea3d902a080
BLAKE2b-256 checksum
How to use checksums
745a7b7c6f447b792d9177aeddb31279c47f07b931ed3f0e68eb223099e9ae86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / hackme-1.0.0-py3-none-any.whl

Download URL hackme-1.0.0-py3-none-any.whl
Size 30.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95ff9313b7af75d10016d884a3badd6dc4674c44b5e700b04db463ae6698e0f7
BLAKE2b-256 checksum
How to use checksums
1e05bd8b78e347b9a8cf4561eaa377893f7329a40d0e1543ce3b9f3b16e91c1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Security for hackme 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page