mirror of
https://github.com/k4m4/kickthemout.git
synced 2024-11-10 15:18:52 +01:00
Compare commits
No commits in common. "master" and "v0.1" have entirely different histories.
32
.github/ISSUE_TEMPLATE.md
vendored
32
.github/ISSUE_TEMPLATE.md
vendored
@ -1,32 +0,0 @@
|
||||
<!--
|
||||
Hi there! Thank you for bringing an issue to out attention.
|
||||
|
||||
Before submitting, let's make sure of a few things.
|
||||
Please ensure the following boxes are ticked if they apply.
|
||||
If they do not, please try and fulfill them first.
|
||||
-->
|
||||
|
||||
<!-- Checked checkbox should look like this: [x] -->
|
||||
|
||||
## Checklist for submitting an issue to `KickThemOut`:
|
||||
|
||||
- [ ] I have carefully read the [README](https://github.com/k4m4/kickthemout/blob/master/README.rst) file and haven't managed to resolve my issue.
|
||||
- [ ] I have searched the [issues](https://github.com/k4m4/kickthemout/issues?utf8=%E2%9C%93&q=is%3Aissue) of this repo and believe that this is not a duplicate.
|
||||
- [ ] I am running the latest version of KickThemOut.
|
||||
|
||||
<!--
|
||||
Once all boxes are ticked, it would be very helpful if you could fill in the
|
||||
following list with the appropriate information.
|
||||
-->
|
||||
|
||||
- **OS name & version**: <!-- Replace with os name & version -->
|
||||
- **Python version**: <!-- Replace with python version -->
|
||||
- **Scapy version**: <!-- Replace with kamene version -->
|
||||
- **Nmap version**: <!-- Replace with nmap version -->
|
||||
- **Link of [Gist](https://gist.github.com/)**: <!-- Please create a Gist with the response of a `$ sudo python -vvv kickthemout.py` verbosity command & paste the link here -->
|
||||
|
||||
<!-- Now feel free to write about your issue; please remember to be as descriptive as possible! Thanks again! 🙌 ❤️ --><br/ >
|
||||
|
||||
- **Description**: <!-- Replace with a short description of your issue -->
|
||||
|
||||
<!-- Please provide all of the preceding information; otherwise, your issue will be labeled `more-information-needed` and will most probably be ignored. Thank you! -->
|
28
.gitignore
vendored
28
.gitignore
vendored
@ -1,28 +0,0 @@
|
||||
env/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
*.egg-info/
|
||||
*.egg
|
||||
*.manifest
|
||||
*.spec
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
.scrapy
|
||||
target/
|
||||
.python-version
|
||||
venv/
|
||||
ENV/
|
||||
*.pyc
|
||||
*.tmp
|
||||
*.bak
|
||||
*.cfg
|
||||
__pycache__/
|
28
.travis.yml
28
.travis.yml
@ -1,28 +0,0 @@
|
||||
sudo: required
|
||||
dist: trusty
|
||||
language: python
|
||||
python:
|
||||
- "3.4"
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
|
||||
install:
|
||||
- sudo -H python3 -m pip install -r requirements.txt
|
||||
script:
|
||||
- sudo -H python3 -c "import kickthemout; import scan; import spoof;"
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- python3
|
||||
- python3-pip
|
||||
- nmap
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: always
|
4
CHANGES.rst
Normal file
4
CHANGES.rst
Normal file
@ -0,0 +1,4 @@
|
||||
0.1 (05.01.2017)
|
||||
----------------
|
||||
|
||||
- Initial release.
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017-18 Nikolaos Kamarinakis
|
||||
Copyright (c) 2017 Nikolaos Kamarinakis
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
147
README.md
147
README.md
@ -1,147 +0,0 @@
|
||||
![KickThemOut Logo](http://nikolaskama.me/content/images/2017/02/kickthemout_small.png)
|
||||
|
||||
# KickThemOut
|
||||
|
||||
> [KickThemOut](https://nikolaskama.me/kickthemoutproject) - **Kick Devices Off Your Network**
|
||||
|
||||
A tool to kick devices out of your network and enjoy all the bandwidth for yourself.
|
||||
It allows you to select specific or all devices and ARP spoofs them off your local area network.
|
||||
|
||||
- Compatible with Python **3+** 🎉.
|
||||
|
||||
- *Not* compatible with Windows.
|
||||
|
||||
Authors: [Nikolaos Kamarinakis](mailto:nikolaskam@gmail.com) & [David Schütz](mailto:xdavid@protonmail.com).
|
||||
|
||||
[![Build Badge](https://travis-ci.org/k4m4/kickthemout.svg?branch=master)](https://travis-ci.org/k4m4/kickthemout)
|
||||
[![License Badge](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/k4m4/kickthemout/blob/master/LICENSE)
|
||||
[![Compatibility](https://img.shields.io/badge/python-3-brightgreen.svg)](https://github.com/k4m4/kickthemout)
|
||||
[![GitHub Stars](https://img.shields.io/github/stars/k4m4/kickthemout.svg)](https://github.com/k4m4/kickthemout/stargazers)
|
||||
|
||||
---
|
||||
|
||||
<p align="center">✨Read my latest post: <a href="https://nikolaskama.me/kickthemout-v2-0/"><i>KickThemout v2.0! 🎉</i></a></p>
|
||||
|
||||
-------------
|
||||
|
||||
# Installation
|
||||
|
||||
## Debian Installation
|
||||
|
||||
You can download KickThemOut by cloning the [Git Repo](https://github.com/k4m4/kickthemout) and simply installing its requirements:
|
||||
|
||||
```
|
||||
~ ❯❯❯ sudo apt-get update && sudo apt-get install nmap
|
||||
|
||||
~ ❯❯❯ git clone https://github.com/k4m4/kickthemout.git
|
||||
|
||||
~ ❯❯❯ cd kickthemout/
|
||||
|
||||
~/kickthemout ❯❯❯ sudo -H pip3 install -r requirements.txt
|
||||
|
||||
~/kickthemout ❯❯❯ sudo python3 kickthemout.py
|
||||
```
|
||||
|
||||
|
||||
## MacOS Installation
|
||||
|
||||
If you would like to install KickThemOut on a Mac, please run the following:
|
||||
|
||||
```
|
||||
~ ❯❯❯ brew install libdnet nmap
|
||||
|
||||
~ ❯❯❯ git clone https://github.com/k4m4/kickthemout.git
|
||||
|
||||
~ ❯❯❯ cd kickthemout/
|
||||
|
||||
~/kickthemout ❯❯❯ sudo -H pip3 install -r requirements.txt
|
||||
|
||||
~/kickthemout ❯❯❯ sudo python3 kickthemout.py
|
||||
```
|
||||
|
||||
**NOTE**: You need to have [Homebrew](http://brew.sh/) installed before running the Mac OS installation.
|
||||
|
||||
Also, **keep in mind** that you might be asked to run some extra commands after executing the pip requirement installation.
|
||||
|
||||
|
||||
## ArchLinux Installation
|
||||
|
||||
You can download KickThemOut on an Arch based system by executing the following:
|
||||
|
||||
```
|
||||
~ ❯❯❯ git clone https://github.com/k4m4/kickthemout.git
|
||||
|
||||
~ ❯❯❯ cd kickthemout/
|
||||
|
||||
~/kickthemout ❯❯❯ sudo -H pip3 install -r requirements.txt
|
||||
|
||||
~/kickthemout ❯❯❯ sudo python3 kickthemout.py
|
||||
```
|
||||
|
||||
<br/>
|
||||
|
||||
# Usage
|
||||
|
||||
```
|
||||
Usage: sudo python3 kickthemout.py [options]
|
||||
|
||||
Options:
|
||||
--version show program's version number and exit
|
||||
-h, --help show this help message and exit
|
||||
-p PACKETS, --packets=PACKETS
|
||||
number of packets broadcasted per minute (default: 6)
|
||||
-s, --scan perform a quick network scan and exit
|
||||
-t TARGETS, --target=TARGETS
|
||||
specify target IP address(es) and perform attack
|
||||
|
||||
Examples:
|
||||
sudo python3 kickthemout.py --target 192.168.1.10
|
||||
sudo python3 kickthemout.py -t 192.168.1.5,192.168.1.10 -p 30
|
||||
sudo python3 kickthemout.py (interactive mode)
|
||||
```
|
||||
|
||||
To view all available options run:
|
||||
|
||||
```
|
||||
~/kickthemout ❯❯❯ sudo python3 kickthemout.py -h
|
||||
```
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
# Demo
|
||||
|
||||
Here's a short demo:
|
||||
|
||||
[![Asciinema Demo](https://nikolaskama.me/content/images/2017/01/kickthemout_asciinema.png)](https://asciinema.org/a/98200?autoplay=1&loop=1)
|
||||
|
||||
(For more demos click [here](https://asciinema.org/~k4m4))
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
# Developers
|
||||
|
||||
* Nikolaos Kamarinakis - [@nikolaskama](https://twitter.com/nikolaskama)
|
||||
* David Schütz - [@xdavidhu](https://twitter.com/xdavidhu)
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
# Disclaimer
|
||||
|
||||
KickThemOut is provided as is under the MIT Licence (as stated below).
|
||||
It is built for educational purposes *only*. If you choose to use it otherwise, the developers will not be held responsible. Please, do not use it with evil intent.
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
# License
|
||||
|
||||
Copyright (c) 2017-18 by [Nikolaos Kamarinakis](mailto:nikolaskam@gmail.com) & [David Schütz](mailto:xdavid@protonmail.com). Some rights reserved.
|
||||
|
||||
KickThemOut is under the terms of the [MIT License](https://www.tldrlegal.com/l/mit), following all clarifications stated in the [license file](https://raw.githubusercontent.com/k4m4/kickthemout/master/LICENSE).
|
||||
|
||||
|
||||
For more information head over to the [official project page](https://nikolaskama.me/kickthemoutproject).
|
||||
You can also go ahead and email me anytime at **nikolaskam{at}gmail{dot}com** or David at **xdavid{at}protonmail{dot}com**.
|
52
README.rst
Normal file
52
README.rst
Normal file
@ -0,0 +1,52 @@
|
||||
KickThemOut
|
||||
============
|
||||
|
||||
`KickThemOut <https://nikolaskama.me/kickthemoutproject/>`_ - **Kick Devices Off Your Network**
|
||||
|
||||
A tool to kick devices out of your network and enjoy all the bandwidth for yourself.
|
||||
It allows you to select specific or all devices and ARP spoofs them off your local area network.
|
||||
|
||||
Compatible with Python 2.6 & 2.7.
|
||||
|
||||
Authors: `Nikolaos Kamarinakis <mailto:nikolaskam@gmail.com>`_ & `David Schütz <mailto:xdavid@protonmail.com>`_
|
||||
|
||||
.. image:: https://nikolaskama.me/content/images/2017/01/kickthemout.png
|
||||
|
||||
Installation
|
||||
-------------
|
||||
|
||||
You can download KickThemOut by cloning the `Git Repo <https://github.com/k4m4/kickthemout>`_ and simply installing its requirements::
|
||||
|
||||
$ git clone https://github.com/k4m4/kickthemout.git
|
||||
|
||||
$ cd kickthemout
|
||||
|
||||
$ pip install -r requirements.txt
|
||||
|
||||
Demo
|
||||
-----
|
||||
|
||||
Here's a short demo:
|
||||
|
||||
.. image:: https://nikolaskama.me/content/images/2017/01/kickthemout_asciinema.png
|
||||
:target: https://asciinema.org/a/98200?autoplay=1&loop=1
|
||||
|
||||
(For more demos click `here <https://asciinema.org/~k4m4>`_)
|
||||
|
||||
Disclaimer
|
||||
-----------
|
||||
|
||||
KickThemOut is provided as is under the MIT Licence (as stated below).
|
||||
It is built for educational purposes only. If you choose to use it otherwise, the developers will not be held responsible.
|
||||
In brief, do not use it with evil intent.
|
||||
|
||||
License
|
||||
--------
|
||||
|
||||
Copyright (c) 2017 by `Nikolaos Kamarinakis <mailto:nikolaskam@gmail.com>`_ & `David Schütz <mailto:xdavid@protonmail.com>`_. Some rights reserved.
|
||||
|
||||
KickThemOut is under the terms of the `MIT License <https://www.tldrlegal.com/l/mit>`_, following all clarifications stated in the `license file <https://raw.githubusercontent.com/k4m4/kickthemout/master/LICENSE>`_.
|
||||
|
||||
|
||||
For more information head over to the `official project page <https://nikolaskama.me/kickthemoutproject/>`_.
|
||||
You can also go ahead and email me anytime at **nikolaskam{at}gmail{dot}com** or David at **xdavid{at}protonmail{dot}com**.
|
@ -1,74 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
nationality, personal appearance, race, religion, or sexual identity and
|
||||
orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at nikolaskam@gmail.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
949
kickthemout.py
949
kickthemout.py
File diff suppressed because it is too large
Load Diff
@ -1,3 +1 @@
|
||||
scapy
|
||||
python-nmap
|
||||
netifaces
|
||||
scapy
|
77
scan.py
77
scan.py
@ -1,25 +1,64 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
# -.- coding: utf-8 -.-
|
||||
# scan.py
|
||||
# scan.py
|
||||
# author: Benedikt Waldvogel (MIT Licensed)
|
||||
# edited by: k4m4 & xdavidhu
|
||||
|
||||
"""
|
||||
Copyright (C) 2017-18 Nikolaos Kamarinakis (nikolaskam@gmail.com) & David Schütz (xdavid@protonmail.com)
|
||||
See License at nikolaskama.me (https://nikolaskama.me/kickthemoutproject)
|
||||
"""
|
||||
import logging
|
||||
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
|
||||
import scapy.config, scapy.layers.l2, scapy.route, socket, math, errno
|
||||
|
||||
import nmap
|
||||
def scanNetwork():
|
||||
|
||||
# perform a network scan with nmap
|
||||
def scanNetwork(network):
|
||||
returnlist = []
|
||||
nm = nmap.PortScanner()
|
||||
a = nm.scan(hosts=network, arguments='-sn')
|
||||
def long2net(arg):
|
||||
if (arg <= 0 or arg >= 0xFFFFFFFF):
|
||||
raise ValueError("illegal netmask value", hex(arg))
|
||||
return 32 - int(round(math.log(0xFFFFFFFF - arg, 2)))
|
||||
|
||||
for k, v in a['scan'].items():
|
||||
if str(v['status']['state']) == 'up':
|
||||
try:
|
||||
returnlist.append([str(v['addresses']['ipv4']), str(v['addresses']['mac'])])
|
||||
except:
|
||||
pass
|
||||
def to_CIDR_notation(bytes_network, bytes_netmask):
|
||||
network = scapy.utils.ltoa(bytes_network)
|
||||
netmask = long2net(bytes_netmask)
|
||||
net = "%s/%s" % (network, netmask)
|
||||
if netmask < 16:
|
||||
return None
|
||||
|
||||
return returnlist
|
||||
return net
|
||||
|
||||
def scan_and_print_neighbors(net, interface, timeout=1):
|
||||
hostsList = []
|
||||
try:
|
||||
ans, unans = scapy.layers.l2.arping(net, iface=interface, timeout=timeout, verbose=False)
|
||||
for s, r in ans.res:
|
||||
mac = r.sprintf("%Ether.src%")
|
||||
ip = r.sprintf("%ARP.psrc%")
|
||||
line = r.sprintf("%Ether.src% %ARP.psrc%")
|
||||
hostsList.append([ip, mac])
|
||||
try:
|
||||
hostname = socket.gethostbyaddr(r.psrc)
|
||||
line += "," + hostname[0]
|
||||
except socket.herror:
|
||||
pass
|
||||
except socket.error as e:
|
||||
if e.errno == errno.EPERM: # Operation not permitted
|
||||
exit()
|
||||
else:
|
||||
raise
|
||||
return hostsList
|
||||
|
||||
for network, netmask, _, interface, address in scapy.config.conf.route.routes:
|
||||
|
||||
# skip loopback network and default gw
|
||||
if network == 0 or interface == 'lo' or address == '127.0.0.1' or address == '0.0.0.0':
|
||||
continue
|
||||
|
||||
if netmask <= 0 or netmask == 0xFFFFFFFF:
|
||||
continue
|
||||
|
||||
net = to_CIDR_notation(network, netmask)
|
||||
|
||||
if interface != scapy.config.conf.iface:
|
||||
# see http://trac.secdev.org/scapy/ticket/537
|
||||
continue
|
||||
|
||||
if net:
|
||||
return scan_and_print_neighbors(net, interface)
|
12
spoof.py
12
spoof.py
@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
# -.- coding: utf-8 -.-
|
||||
# spoof.py
|
||||
# authors: k4m4 & xdavidhu
|
||||
|
||||
"""
|
||||
Copyright (C) 2017-18 Nikolaos Kamarinakis (nikolaskam@gmail.com) & David Schütz (xdavid@protonmail.com)
|
||||
Copyright (C) 2016 Nikolaos Kamarinakis (nikolaskam@gmail.com) & David Schütz (xdavid@protonmail.com)
|
||||
See License at nikolaskama.me (https://nikolaskama.me/kickthemoutproject)
|
||||
"""
|
||||
|
||||
@ -14,14 +15,9 @@ from scapy.all import (
|
||||
getmacbyip,
|
||||
ARP,
|
||||
Ether,
|
||||
sendp,
|
||||
conf,
|
||||
RadioTap,
|
||||
Dot11,
|
||||
Dot11Deauth
|
||||
sendp
|
||||
)
|
||||
|
||||
# send malicious ARP packets
|
||||
def sendPacket(my_mac, gateway_ip, target_ip, target_mac):
|
||||
ether = Ether()
|
||||
ether.src = my_mac
|
||||
|
Loading…
Reference in New Issue
Block a user