-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b850f4
commit 1af80f6
Showing
13 changed files
with
89 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../.init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manually send a Transmission Control Protocol packet. | ||
The packet should have `TCP sport=31337, dport=31337, seq=31337, ack=31337, flags=APRSF`. | ||
The packet should be sent to the remote host at `10.0.0.2`. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/exec-suid --real -- /usr/bin/python -I | ||
|
||
from dojjail import Host, Network | ||
import scapy.all as scapy | ||
|
||
flag = open("/flag").read() | ||
|
||
class RawPacketHost(Host): | ||
def entrypoint(self): | ||
scapy.conf.ifaces.reload() | ||
scapy.sniff(prn=self.handle_packet, iface="eth0") | ||
|
||
def handle_packet(self, packet): | ||
if "TCP" not in packet: | ||
return | ||
if (packet["TCP"].sport == 31337 and packet["TCP"].dport == 31337 and | ||
packet["TCP"].seq == 31337 and packet["TCP"].ack == 31337 and | ||
packet["TCP"].flags == "APRSF"): | ||
print(flag, flush=True) | ||
|
||
user_host = Host("ip-10-0-0-1") | ||
raw_packet_host = RawPacketHost("ip-10-0-0-2") | ||
network = Network(hosts={user_host: "10.0.0.1", raw_packet_host: "10.0.0.2"}, subnet="10.0.0.0/24") | ||
network.run() | ||
|
||
user_host.interact() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../.init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manually send an Ethernet packet. | ||
The packet should have `Ether type=0xFFFF`. | ||
The packet should be sent to the remote host at `10.0.0.2`. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/exec-suid --real -- /usr/bin/python -I | ||
|
||
from dojjail import Host, Network | ||
import scapy.all as scapy | ||
|
||
flag = open("/flag").read() | ||
|
||
class RawPacketHost(Host): | ||
def entrypoint(self): | ||
scapy.conf.ifaces.reload() | ||
scapy.sniff(prn=self.handle_packet, iface="eth0") | ||
|
||
def handle_packet(self, packet): | ||
if "Ether" not in packet: | ||
return | ||
if packet["Ether"].type == 0xFFFF: | ||
print(flag, flush=True) | ||
|
||
user_host = Host("ip-10-0-0-1") | ||
raw_packet_host = RawPacketHost("ip-10-0-0-2") | ||
network = Network(hosts={user_host: "10.0.0.1", raw_packet_host: "10.0.0.2"}, subnet="10.0.0.0/24") | ||
network.run() | ||
|
||
user_host.interact() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../.init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manually send an Internet Protocol packet. | ||
The packet should have `IP proto=0xFF`. | ||
The packet should be sent to the remote host at `10.0.0.2`. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/exec-suid --real -- /usr/bin/python -I | ||
|
||
from dojjail import Host, Network | ||
import scapy.all as scapy | ||
|
||
flag = open("/flag").read() | ||
|
||
class RawPacketHost(Host): | ||
def entrypoint(self): | ||
scapy.conf.ifaces.reload() | ||
scapy.sniff(prn=self.handle_packet, iface="eth0") | ||
|
||
def handle_packet(self, packet): | ||
if "IP" not in packet: | ||
return | ||
if packet["IP"].proto == 0xFF: | ||
print(flag, flush=True) | ||
|
||
user_host = Host("ip-10-0-0-1") | ||
raw_packet_host = RawPacketHost("ip-10-0-0-2") | ||
network = Network(hosts={user_host: "10.0.0.1", raw_packet_host: "10.0.0.2"}, subnet="10.0.0.0/24") | ||
network.run() | ||
|
||
user_host.interact() |