Semtex Level 6
Semtex Level 6 — forge an ICMP packet with a spoofed source address using a raw socket helper.
Table of Contents
Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.
ICMP forging
Send a special ICMP packet to an unknown host. Add the correct payload to it, to make sure you can receive the password. Spoof your origin address and make semtex believe, the packet is really coming from some government server (*.gov) Make sure this server you are sending from has a reverse DNS entry, otherwise you will not receive an answer.
You find more specific information in your home directory. ** Note: You will have to use /semtex/semtexraw. Take a look at the source**
Reading Material
Study guide
Level map: the helper is /semtex/semtexraw; more instructions are in your home directory.
What this level teaches
Raw sockets, ICMP and source-address spoofing.
Key ideas
- ICMP. The protocol behind
ping, used for network control messages. - Raw sockets. They let a program craft packets, including headers; this normally requires special privilege, which is why a helper is provided.
- Spoofing. The page asks you to make the packet appear to come from a
.govserver and notes that your sending host needs a reverse DNS entry. - Reading. The ICMP RFC and a raw socket tutorial are linked.
How to approach it
- Read the helper’s source and the instructions in your home directory.
- Build the ICMP message with the required payload.
- Send it and listen for the reply.
Why it matters
Spoofing is the basis of reflection attacks, and source address validation is the defence.