Python port of Fragroute with new additions
Report Bug
·
Request Feature
FragroutePlusPy started out as a direct Python port of Fragroute but grew as extensions of the original such as IPv6 support and original evasions were added. This project uses nfqueue to intercept packets, dpkt to manipulate packets, and Scapy (for now) to write packets on the wire.
To get a local copy up and running follow these simple steps.
-
python2
-
nfqueue python bindings
sudo add-apt-repository 'deb http://http.us.debian.org/debian stretch main contrib non-free' sudo apt update sudo apt install python-nfqueue
-
python packages
sudo pip install -r requirements.txt
- Clone the repo
git clone https://github.com/CreatePhotonW/fragroutepluspy.git
Run:
sudo ./fragroutepluspy/fragroutepluspy.py -f fragroutepluspy/scripts/tcp_seg.conf 1.2.3.4
Where "1.2.3.4" is the IPv4 or IPv6 address of the destination.
For more example rule scripts, please refer to the example rule scripts
Directives:
# comment
#define <name>
<value>
#enddefine
print
echo string
dup [first|last|random|<idx>] <prob>
drop [first|last|random|<idx>] <prob>
delay [first|last|random|<idx>] <ms>
apply [first|last|random|<idx>] <prob> [/path/to/some.conf|@conf_var]
order [reverse|random]
ip_frag <size> [old|new]
fragmentation favor old no longer works on Windows 7 and above.
IPv4 ONLY
ip_ttl <ttl>
IPv4 ONLY
ip_tos <tos>
IPv4 ONLY
ip_opt [lsrr|ssrr <ptr> <ip-addr> ...] | [raw <byte stream>]
IPv4 ONLY
ip_chaff [dup|opt|<ttl>|cksum|conf [/path/to/some.conf|@conf_var] [before|after|sandwich]
IPv4 ONLY
tcp_seg <size> [old|new|windows_new [<size2>]|windows_new_old <size2>]
tcp_chaff [cksum|null|paws|rexmit|seq|syn|<ttl>|opt|timestamp|conf [/path/to/some.conf|@conf_var]] [before|after|sandwich]
PAWS assumes TCP segments have monotonically increasing TCP timestamps
<ttl>: IPv4 ONLY
opt: IPv4 ONLY
timestamp: IPv4 ONLY
tcp_opt [mss|wscale] <size>
if "(conditional):" [/path/to/true.conf|@conf_var] [/path/to/false.conf|@conf_var]
conditional is a python expression
ip6_frag <size>
IPv6 ONLY
ip6_chaff [dup|conf [/path/to/some.conf|@conf_var]] [before|after|sandwich]
IPv6 ONLY
ip6_qos <tc> <fl>
IPv6 ONLY
ip6_qos <tc> <fl>
IPv6 ONLY
ip6_opt raw <type> <byte stream> [fragmentable|unfragmentable]
IPv6 ONLY
Supports the use of environment variables in configs.
ip_frag $FRAG_SIZE
_For more information on rule script directives, run ./fragroutepluspy/fragroutepluspy.py -?
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
CreatePhotonW - @CreatePhotonW
Project Link: https://github.com/CreatePhotonW/fragroutepluspy