0

I need to switch the transformation of a file (FTP client) to my code in order to transfer the wanted file using the payload of one of the following protocols: ICMP - use ICMP packets to send the file OR using DNS packet to send the file. in each of the above methods we need to build packets from the specified protocol and sending them in a way that in each packet we can add a little bit of information to the file in a hidden way (this is in the foreign computer) while my computer awaits for these packets and then gathers them in to one file.

This is a part of an assignment and would like for some help how to start, was recommended using scapy in python.

1

1 Answer 1

1

You could find either dpkt or scapy useful. Once installed, you can explore them interactively. Try something like:

%% python3
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170118] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dpkt
>>> help(dpkt.icmp.ICMP)

Or try something like the ICMP example from Scapy:

#! /usr/bin/env python
import sys
from scapy.all import sr1,IP,ICMP

p=sr1(IP(dst=sys.argv[1])/ICMP())
if p:
    p.show()

You'll find DNS to be similar, but have different limitations on the payload they will support. In either case, you will have to do some payload manipulation to send parts of the file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.