ICMPUSH(8)
ICMPUSH(8) π
okay bestie, gather round, because this is icmpush β straight out of the System Manager's Manual, section 8, the big-girl section where all the system admin tools live. it builds ICMP packets. yes, those ICMP packets. the ones your ping uses. we're going β¨customβ¨ today. π
NAME π¦
icmpush β ICMP packet builder. that's it, that's the whole job, and she does it flawlessly. π
SYNOPSIS πΈ
icmpush type [options] host
like. give her a type, some options if you're feeling spicy, and a host. boom. packet. β¨
DESCRIPTION π
so icmpush is a tool that builds ICMP packets fully customized from the command line. fully. customized. no defaults you didn't ask for, no vibes you didn't choose. you're the main character here and you're writing the packet by hand. π
she supports these ICMP error types:
- Redirect
- Source Quench
- Time Exceeded
- Destination Unreach
- Parameter Problem
and these ICMP information types:
- Address Mask Request
- Timestamp
- Information Request
- Echo Request
- Router Solicitation
- Router Advertisement
ngl, it is not our job here to give you a full dissertation on how the ICMP protocol works. but fr fr β the more you actually know about it, the more you can fully understand how to manage it, use it, and unlock all the possibilities this tool is hiding. π§
okay and yes, the number of arguments can look like a lot. lowkey excessive. but the author himself reminds you: some of this data is imperative β it has to come through the command line so the ICMP packet can be adjusted fully to match the protocol format. it's not extra, it's the format. periodt. π
and because we love you, there's a long list of examples down in the EXAMPLES section showing this program in actual real use. π
β¨ OPTIONS β¨ π
the basics, the starter pack π«Ά
-h,--helpβ help. she's telling you how she works. π-V,--versionβ program version. which girl are we running. π·οΈ-v,--verboseβ informative mode. she talks more.-vv,--more_verboseβ even more informative. genuinely useful when you're debugging, no cap. π
the ICMP type β pick your fighter πΈ
the ICMP type type can be any of these bad boys:
-du,--dest_unreachβ Destination Unreach. the IP packet couldn't be given. this ICMP type is an error. π-sq,--src_quenchβ Source Quench. the IP packet is not given due to a congestion on the net. this ICMP type is an error.-red,--redirectβ Redirect. a request to forward IP packets through another router. this ICMP type is an error.-echo,--echo_requestβ Echo Request. a request sent to a host to receive an echo reply. this ICMP type is information. β¨-rta,--router_advert address[/preference]β Router Advertisement. the router transmits one or more routers with address address and preference preference. if the preference is omitted, the default preference0is given. this ICMP type is information.-rts,--router_solicitβ Router Solicitation. the host's requirement for a message of one or more routers. like the previous one, it's part of the Router Discovery message exchange, and this ICMP type is information.-tx,--time_excβ Time Exceeded. Time Exceeded for an IP packet. this ICMP type is an error.-param,--param_problemβ Parameter Problem. an erroneous value on a variable of the IP header. this ICMP type is an error.-tstamp,--timestampβ Timestamp. a host request to receive the time of another host. this ICMP type is information.-info,--info_reqβ Information Request. a host request to receive an Info Reply from another host. this ICMP type is information.-mask,--mask_reqβ Address Mask Request. used to find out a host network mask. this ICMP type is information.
and the options β the rest of the girlies π
-sp,--spoof addressβ the IP address to be used as the source of the ICMP packet. yes bestie, you can be someone else. π-to,--timeout secsβ timeout in seconds for reading the answers. only valid on ICMPs of information type, with the exception of the Router Advertisement type (-rta). default is5seconds. if0is given, answers can not be read. π-n,--no_resolveβ don't use name resolution. we're going raw IP, no DNS in the group chat. π«-lt,--lifetime secsβ lifetime in seconds of the router announcement. only valid with the Router Advertisement (-rta) type. default is1800seconds (that's 30', a whole half hour of router announcement realness). β³-gw,--gateway addressβ route gateway address on an ICMP Redirect (-red). by default it'll be the spoof address (-sp) if one was specified, or the outgoing IP address if it wasn't. πͺ-dest,--route_dest addressβ route destination address on an ICMP Redirect (-red). > this is a required option when sending an ICMP Redirect. don't skip her, she's mandatory. β οΈ-orig,--orig_host addressβ the original host within the IP header sent in the 64 bits data field of an ICMP error. by default it'll be the same as the IP of the host that sends the ICMP packet.-psrc,--port_src portβ source port (tcp or udp) within the IP header sent in the 64 bits data field of an ICMP error. default is0.-pdst,--port_dest portβ destination port (tcp or udp) within the IP header sent in the 64 bits data field of an ICMP error. default is0.-prot,--protocol icmp|tcp|udpβ the protocol to be used within the IP header sent in the 64 bits data field of an ICMP error. must be one of the three listed above. default isTcp.-id,--echo_id identificatorβ echo identificator within the IP header sent in the 64 bits data field of an ICMP error, when the IP header protocol of the 64 bits data field (-prot) isicmp. default is0.-seq,--echo_seq sequenceβ echo sequence number within the IP header sent in the 64 bits data field of an ICMP error, when the IP header protocol of the 64 bits data field (-prot) isicmp. default is0.-pat,--pattern patternβ the data pattern to send on an Echo Request (-echo). π¨-gbg,--garbage bytes|maxβ the number of garbage bytes that will be sent on any ICMP packet. withmax, the maximum possible will be sent. ποΈβ¨-ptr,--pointer byteβ pointer to the erroneous bytebyteon an ICMP packet showing a parameter problem. valid only on the Parameter Problem type (-param). π-c,--code code|num|maxβ the ICMP code to send.- a code
codeis valid for the Destination Unreach (-du), Redirect (-red) and Time Exceeded (-tx) types. - a numerical code can be specified for the ICMP types that don't have one (Echo Request, Information Request, Address Mask Request, Router Solicitation, Router Advertisement, Source Quench, Parameter Problem and Timestamp).
- using
max, an ICMP code bigger than the admitted ones will be sent. π - the next ICMP CODES section enumerates the valid code types. β¬οΈ
- a code
π ICMP CODES π π
the valid codes used with the Destination Unreach, Redirect y Time Exceeded types are:
- used with the Destination Unreach type (-du): π
net-unreach(Net Unreachable) β the destination net is unreacheable.host-unreach(Host Unreachable) β the destination host is unreacheable.prot-unreach(Protocol Unreachable) β the desired protocol is unreacheable to the destination host.port-unreach(Port Unreachable) β the desired port is unreacheable to the destination host.frag-needed(Fragmentation Needed and Don't Fragment was Set) β shows that the IP packet had to be fragmented because of its size, but the sender did not allow it because of the DF (DON'T FRAGMENT) flag.sroute-fail(Source Route Failed) β couldn't follow the route indicated on the IP packet.net-unknown(Destination Network Unknown) β the destination network is unknown.host-unknown(Destination Host Unknown) β destination host unknown, but the network is known.host-isolated(Source Host Isolated) β can't reach the destination host.net-ano(Communication with Destination Network is Administratively Prohibited) β access to the network is denied through a firewall or similar on the receiver side.host-ano(Communication with Destination Host is Administratively Prohibited) β access to the host is denied through a firewall or similar on the receiver side.net-unr-tos(Destination Network Unreachable for Type of Service) β indicates on the destination network that the Type Of Service (TOS) applied for is not allowed.host-unr-tos(Destination Host Unreachable for Type of Service) β shows that the destination host is unreachable with the applied TOS.com-admin-prohib(Communication Administratively Prohibited) β a router can't forward a packet because of an administrative filter.host-precedence-viol(Host Precedence Violation) β the IP packet precedence is not allowed.precedence-cutoff(Precedence cutoff in effect) β a smaller IP packet precedence has tried to be sent over the minimum imposed by the network's manager.
- used with the Redirect type (-red): π¦
net(Redirect Datagram for the Network) β shows that the destination is a network.host(Redirect Datagram for the Host) β shows that the destination is a host.serv-net(Redirect Datagram for the Type Of Service and Network) β the destination is a type of service and network.serv-host(Redirect Datagram for the Type Of Service and Host) β the destination is a type of service and host.
and π«
- used with the Time Exceeded type (-tx): β°
ttl(Time to Live exceeded in Transit) β time is over on an IP's header packet.frag(Fragment Reassembly Time Exceeded) β could not put the IP's packet fragment together again.
π RETURN CODES π π«Ά
icmpush can be easily used within shell scripts β she plays nice with others, we love a collaborative queen. the program returns the following data to the shell:
0β Finished program OK. π1β Incorrect argument number.2β Unkown ICMP protocol.3β Cannot create RAW socket type.4β Erroneous ICMP packet.5β Erroneous gateway.6β Erroneous destination route.7β Erroneous ICMP packet code.8β Erroneous source host.9β Error sending packet.10β Protocol still not implemented.11β Erroneous IP address or spoof host incorrect.12β Could not save memory for the data_hdr union.13β Erroneous IP address or packet destination host.14β Unkown protocol.16β Error reading RAW socket.17β Error initializing signal handler SIGALARM.18β Echo Request packet data too big.19β Source port incorrect.20β Destination port incorrect.21β Incorrect timeout value.22β Incorrect Echo ID.23β Incorrect sequence number.24β Erroneous Echo data.25βIP_HDRINCLerror.26β Erroneous router address in Router Advertisement.27β Incorrect garbage bytes number.28β Incorrect ICMP pointer Parameter Problem.
bestie, notice15is justβ¦ not here. she's not on the list. we don't ask about15. π
π EXAMPLES π
okay bestie this is the part where it all comes together, fr fr. these are real receipts. copy them, tweak them, live your truth. π«Ά
- so picture this: somebody already sent a packet with TCP source port
100and destination port90, and now we wanna clap back with an ICMP Redirect toasshole.esso it rewrites its routing table. the tea:10.12.12.12becomes the gateway to the hostdeath.es, and we mask the packet source so it looks like it came from the hostinfect.comx. sneaky lil main character move β¨
icmpush -red -sp infect.comx -gw 10.12.12.12 -dest death.es -c host
-prot tcp -psrc 100 -pdst 90 asshole.es
- same energy, different victim: an ICMP Echo Request went out with Echo Request id
100and sequence number90, and we're sending an ICMP Redirect tohemorroids.esto mess with its routing table. the data: the hostpizza.deathis the gateway to the hostdeath.es, and we're masking the packet source so it looks like it came frominfect.comx. no cap π
icmpush -red -sp infect.comx -gw pizza.death -dest death.es -c host
-prot icmp -id 100 -seq 90 hemorroids.es
- we wanna send an ICMP Destination Unreach to
10.2.3.4basically saying "bestie, your TCP port2100?? our TCP port20could never connect to that, it's unreachable." and we're masking ourselves as the host10.1.1.1. periodt.
icmpush -du -sp 10.1.1.1 -c port-unreach -prot tcp -psrc 2100 -pdst 20
10.2.3.4
- another Destination Unreach, this time sliding into
10.2.3.4's DMs to say that the hostinferno.helland its TCP port69could not connect to his TCP port666β unreachable, sorry babe π. and we're masking ourselves as the gatewayrouter.comx.
icmpush -du -sp router.comx -c host-unreach -prot tcp -psrc 666 -pdst 69
-orig inferno.hell 10.2.3.4
- now we're sending an ICMP Source Quench to
ldg02.hell, replying to a packet that was headed to the hostldg00over UDP, source port100and destination port200. we mask ourselves as the gateway10.10.10.1. iconic πΈ
icmpush -sq -sp 10.10.10.1 -prot udp -psrc 100 -pdst 200 -orig ldg00
ldg02.hell
- an ICMP Time Exceeded to
ldg02.hell, again in response to a packet destined for the hostldg00, UDP protocol, source port100, destination port200. this time we mask as the gatewayldg04.hell.
icmpush -tx -sp ldg04.hell -c frag -prot udp -psrc 100 -pdst 200 -orig
ldg00 ldg02.hell
- sending an ICMP Address Mask Request and then just... waiting
10whole seconds to see who replies (the suspense, the drama π). we mask the packet with the source address10.2.3.4and yeet it to10.0.1.255.
icmpush -mask -sp 10.2.3.4 -to 10 10.0.1.255
- an ICMP Timestamp to
sepultura.hell, masking the packet like it was sent from the host10.2.3.1. we're using the default timeout here, which is5seconds β no notes, it's just the vibe.
icmpush -tstamp --spoof 10.2.3.1 sepultura.hell
- an ICMP Information Request to
voucher.hell. source address is our own IP, and the timeout is20seconds because we're patient and emotionally available π
icmpush -info -to 20 voucher.hell
- an ICMP Router Solicitation to
lazy.hell. source address = our own IP, timeout =20seconds.
icmpush -rts --timeout 20 lazy.hell
- an ICMP Echo Request to
lazy.hellcarrying the data patternMyNameIsGump(yes really π). source address is our own IP, and we wait2seconds to read the data.
icmpush -echo -data MyNameIsGump -to 2 lazy.hell
- an ICMP Echo Request to
10.12.0.255with a data pattern, and ngl we do not want to read the answers. not today.-to 0and we're gone π¦
icmpush -echo -sp 192.168.0.255 -data 'D E A T H' -to 0 192.168.0.255
- chaos mode π₯ an ICMP Destination Unreach to
destination.death, sent with an ICMP code that is bigger than the legal ones, plus60Kof garbage data bolted on. this is unhinged and that's the point.
icmpush -du -c max -gbg 60000 destination.death
- an ICMP Router Advertisement to
death.es, announcing that the routers to use are:router1.xtcwith preference20,router2.xtcwith preference50, androuter3.xtcwith the default preference (0). and we mask ourselves asfatherouter.xtcπ
icmpush -rta router1.xtc/20 -rta router2.xtc/50 -rta router3.xtc -sp
fatherouter.xtc death.es
- an ICMP Parameter Problem to
misery.essaying that the packet sent from the hosthick.org, udp protocol, source port13and destination port53, has an error on the IP header byte13. we also add all the garbage bytes we possibly can, because why not π
icmpush -sp hick.org -param -ptr 13 -prot udp -psrc 13 -pdest 53 -gbg
max misery.es
- an ICMP Timestamp to
www.hicks.org, but with code38instead of the usual code (0). because sometimes you just wanna be different β¨
icmpush -tstamp -c 38 www.hicks.org
π SEE ALSO π
the required reading bestie, the syllabus, the lore:
- Postel, John, "Internet Control Message Protocol - DARPA Internet Program Protocol Specification", RFC 792, USC/Information Sciences Institute, September 1981.
- Mogul, Jeffrey and John Postel, "Internet Standard Subnetting Procedure", RFC 950, Stanford, USC/Information Sciences Institute, August 1985.
- Braden, Robert, "Requeriments for Internet Hosts - Communication Layers", RFC 1122, USC/Information Sciences Institute, October 1989.
- Deering, Stephen, "ICMP Router Discovery Messages", RFC 1256, Xerox PARC, September 1991.
- Baker, Fred, "Requeriments for IP Version 4 Routers", RFC 1812, Cisco Systems, June 1995.
- The Linux source code, everything referent to network code and to ICMP protocol.
π AUTHOR π
this absolute legend wrote it:
- Slayer <tcpbgp@softhome.net>
and that's the whole page bestie, we ate and left no crumbs π this was icmpush v2.2, dated February 22, 1999, and yes it's an ICMPUSH(8) page, so it's giving old-school Unix royalty. go forth and packet, my love ππΈβ¨
π¦ where this page comes from
- debian bookworm: icmpush 2.2-6.2
- ubuntu jammy: icmpush 2.2-6.1build1
- ubuntu noble: icmpush 2.2-7 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms