~stick/challenges

94ef2a61ca6d6f0d5c28ba30169e28f01a2c8597 — Stick 9 months ago 76bd051
[sbtvip] started the ctf

https://sbtvip.ctfd.io/
A security-blue-team-vip-ctf/icmp_extract.py => security-blue-team-vip-ctf/icmp_extract.py +20 -0
@@ 0,0 1,20 @@
import dpkt

with open("sneaky_transmission.pcap", "rb") as pcapfile, open(
    "pcap_extraction", "w+"
) as outfile:
    pcap = dpkt.pcap.Reader(pcapfile)

    for timestamp, buf in pcap:
        eth_frame = dpkt.pcap.Reader(buf)
        if not isinstance(eth_frame.data, dpkt.ip.IP):
            continue
        ip_packet = eth_frame.data
        if not isinstance(ip_packet.data, dpkt.icmp.ICMP):
            continue
        icmp = ip_packet.data
        try:
            outfile.write(icmp.data.data)
        except Exception:
            print("Error extracting ICMP payload")
            continue

A security-blue-team-vip-ctf/pcap_extraction => security-blue-team-vip-ctf/pcap_extraction +0 -0

A security-blue-team-vip-ctf/sneaky_transmission.pcap => security-blue-team-vip-ctf/sneaky_transmission.pcap +0 -0

A security-blue-team-vip-ctf/sneaky_transmission.pcapng => security-blue-team-vip-ctf/sneaky_transmission.pcapng +0 -0