SING(8)
π SING(8) β System Manager's Manual π
okay bestie, gather round, because we're about to talk about sing, from the System Manager's Manual (that's section 8, iykyk π). this one is a whole vibe.
β¨ NAME β¨
sing β Send ICMP Nasty Garbage packets to network hosts π¦
β¨ SYNOPSIS β¨
sing [-hVRnvqGQOBU] [-c count] [-T wait] [-p pattern] [-s datasize] [-F
bytes] [-i interface] [-S spoof] [-t ttl] [-TOS tos] [-l preload] [-M
os] [-L logfile] [-MAC hw_addr] [-x code] [type] host
β¨ DESCRIPTION β¨
sing is that girl who sends ICMP packets that are fully customized from the command line π
. like, fully fully. its whole main character purpose is to replace the niceful ping command with certain enhancenments, and by enhancenments we mean the ability to:
- send/read IP spoofed packets π
- send MAC spoofed packets π
- send, in addition to the ECHO REQUEST type sent by default, many other ICMP types, namely Echo Reply, Address Mask Request, Timestamp, Information Request, Router Solicitation and Router Advertisement β¨
it also supports these ICMP error types, no cap: Redirect, Source Quench, Time Exceeded, Destination Unreachable and Parameter Problem π
it can do a little fingerprinting, and if you wanna know more, go read the FINGERPRINTING TECHNIQUES section, bestie π§
it can emulate certain OOSS sending Echo Request or Echo Reply packets. for more accurate info, check the MIMIC TECHNIQUES section πΈ
the host destination can also be specified as a list of gateways (destination included, obviously) breaked by the '%' symbol β that means you're using a Strict Source Routing IP Option, v.g. router1%router2%router3%host β or by the '@' symbol, which means you're using a Loose Source Routing IP Option, v.g. router1@router2@router3@host π«Ά
and there is a long number of examples in the EXAMPLES section of this page that shows a real use of this program. we love a demo, periodt π
β¨ MOST COMMON OPTIONS β¨
-h,--helpβ Help screen. the "help me bestie" button π-V,--Versionβ Program version. which era of sing are we in β¨-vβ Verbose mode. it tells you everything, like a good friend should π¬-Bβ Send a Bad ICMP Checksum on Information types. chaotic, but make it intentional π-c countβ Stop after sending (and receiving)countpackets. Information types only.-F bytesβ Fragment the entire ICMP packet withbytessize by fragment. Not used on Solaris systems.-Gβ Set the IP header Don't Fragment flag. Not used on Solaris systems.-i interfaceβ Interface (name or IP address) where listen on for replies π-l preloadβ Ifpreloadis specified, sing sends that many packets as fast as possible before falling into its normal mode of behavior. Only the super-user may use this option. Information types only.-L logfileβ Save the current session to the filelogfile. Iflogfileexists, the data will be appended at end π-M osβ Do mimic of theosspecified when sending an Echo Request or Echo Reply.oscan bewin,unix,linux,cisco,solarisorshivaπ-MAC hw_addressβ Do MAC spoofing using the MAChw_address(maybe to surpass filtered switches π). > Be aware of using on an interface with a datalink type different of Ethernet. The MAC address must be on hexadecimal form and must be delimited by':'(Example:00:FF:AC:33:1:B). This option made use of thelibnetlibrary to acces the network link layer. Only the super-user can use this option.-nβ Don't use name resolution. we're going raw IP, bestie π₯-Oβ Do fingerprinting to discover the target OS π΅οΈβοΈ-p patternβ You may specify apatternof bytes to fill out the packet you send. This is useful for diagnosing data-dependent problems in a network. For example,`-p INPACK''will cause the sent packet to be filled with the wordINPACKπ-qβ Quiet output. Nothing is displayed except the summary lines at startup time and when finished π€«-Qβ Totally quiet output. Absolutly nothing is displayed. Useful to use within shell scripts π-Rβ Use Record Route IP Header Option on the ICMP packet πΊοΈ-s bytes|maxβ Number of garbage bytes that will be sent on any ICMP packet. Withmaxthe maximum possible will be sent. it's giving "go big or go home" π-S addressβ IPaddressto be used as the source of the ICMP packet. This force the use of thelibpcaproutines that puts your network interface into promiscuous mode to be able to read the replies. Only the super-user may use this option.-t ttlβ Set the IP Time To Live field tottlvalue β³-T waitβ Waitwaitseconds between sending each packet. The default is to wait for one second between each packet.-TOS tosβ Set the IP Type Of Service field totosvalue π-Uβ Set the IP header Unused bit flag. > Be aware on *BSD systems because the kernel set to 0 the IP header flags when using the Reserved Bit, so SING must revert to promiscuous mode to be able to read the response withlibpcap. Not used on Solaris systems.-x,--xcode code|num|maxβ ICMP code to send. Codecodevalid for Destination Unreachable (-du), Redirect (-red) and Time Exceeded (-tx) types. Numerical code can be specified for the ICMP types that doesn't have (Echo Request, Information Request, Address Mask Request, Router Solicitation, Router Advertisement, Source Quench, Parameter Problem and Timestamp). Usingmaxan ICMP code greater than the admited ones will be sent π. See the ICMP CODES section for a long list of code types.
β¨ ICMP TYPES β¨
the type can be any of the following below, bestie π¦
-echo,--echo_requestβ Echo Request. Request sent to a host to receive an echo reply. This is the type sent by default. This ICMP type is information.-tstamp,--timestampβ Timestamp. Host request to receive the time of 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 π-info,--info_reqβ Information Request. Host request to receive an Info Reply from another host. This ICMP type is information π¨-du,--dest_unreachβ Destination Unreach. IP packet couldn't be given. This ICMP type is error π-sq,--src_quenchβ Source Quench. IP packet is not given due a net congestion. This ICMP type is error π-red,--redirectβ Redirect. Request to forward IP packets through another router. This ICMP type is error β©οΈ-rta,--router_advert address[/preference]β Router Advertisement. Router trasmits one or more routers with addressaddressand preferencepreference. If this is ommited, default preference0is given. This ICMP type is information π’-rts,--router_solicitβ Router Solicitation. Host requeriment for a message of one or more routers. Like the previous, is a part of the messages exchange Router Discovery, and this ICMP type is information πβοΈ-tx,--time_excβ Time Exceeded. Time Exceeded for an IP packet. This ICMP type is error β³-param,--param_problemβ Parameter Problem. Erroneous value on a variable of IP header. This ICMP type is error π¨-replyβ Echo Reply. Response to a Echo Request. This ICMP type is information π
β¨ LESS COMMON OPTIONS β¨
these are the deep cuts, the b-sides, the ones only the real ones know π the options can be any of the following:
-lt,--lifetime secsβ Lifetime in seconds of the router announcement. Only valid with Router Advertisement (-rta) type.1800seconds by default (that's 30', bestie).-gw,--gateway addressβ Route gateway address on an ICMP Redirect (-red). By default will be the spoof address (-S), if it has been specified, or the outgoing IP address if it has not been specified πͺ-dest,--route_dest addressβ Route destination address on an ICMP Redirect (-red). This is a required option when sending an ICMP Redirect. β οΈ-orig,--orig_host addressβ Original host within the IP header sent in the 64 bits data field of an ICMP error. By default will 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.0by default.-pdst,--port_dst portβ Destination port (tcp or udp) within the IP header sent in the 64 bits data field of an ICMP error.0by default.-prot,--protocol name|numberβ Protocol to be used within the IP header sent in the 64 bits data field of an ICMP error. Must be a name from the/etc/protocolsor a protocol number. Onlytcp,udpandicmpare fully implemented; with other protocols the remaining of the 64 bits field are fulfilled with0xFF.TCPby default π§¬-id identificatorβ ICMP id to be used with ICMP of Information types. Do not be confused with the-ip_idoption! π-seq sequenceβ Echo sequence number to be used with Echo Request or Echo Reply types. Do not be confused with the-ip_seqoption! π-ip_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.0by default.-ip_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.0by default.-ptr,--pointer byteβ Pointer to erroneus bytebyteon an ICMP packet showing a parameter problem. Valid only on Parameter Problem type (-param). π
π ICMP CODES π
okay so these are the valid codes you can throw at Destination Unreach, Redirect and Time Exceeded types. there are. so many. buckle up bestie π«Ά
π
used with Destination Unreach type (-du)
net-unreach(Net Unreachable) β the destination net? unreachable. can't get there. tragic.host-unreach(Host Unreachable) β the destination host is unreachable.prot-unreach(Protocol Unreachable) β the desired protocol is unreachable to the destination host.port-unreach(Port Unreachable) β the desired port is unreachable 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 the DF (DON'T FRAGMENT) flag was set.sroute-fail(Source Route Failed) β could'nt 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.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 minimal imposed by the network manager.
π¦ to be used with 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) β destination is a type of service and network.serv-host(Redirect Datagram for the Type Of Service and Host) β destination is a type of service and host.
and π
β¨ to be used with Time Exceeded type (-tx)
ttl(Time to Live exceeded in Transit) β time is over on an IP packet header packet.frag(Fragment Reassembly Time Exceeded) β could not reassembly all the IP packet fragments.
π FINGERPRINTING TECHNIQUES π
with the -O option, SING can use little techniques of remote OS fingerprinting. no cap, it's giving detective energy π΅οΈββοΈ
to distinguish between Window$ boxes and the rest of the world, Ofir Arkin has discovered a simple method: sending an ICMP code that is not 0 within an ICMP Echo Request, a Window$ box respond with a 0 code while the rest of the boxes would leave the code field unchanged. see the SEE ALSO section.
with Solaris systems, SING use a method discovered by me: sending a fragmented Addres Mask Request, any Solaris system (tested from 2.5.1 to Solaris8 Intel & SPARC) respond with an Address Mask of 0's. Last update! some people have noticed that HP-UX v11.0 respond the same way.
see the EXAMPLES section for examples. π
π MIMIC TECHNIQUES π
with the -M option, SING can try to emulate certain OS. at the moment Window$98/Window$NT4 (win value), UNIX (unix value), Linux (linux value), Cisco (cisco value), Solaris (solaris value) or Shiva (shiva value) are the only accepted values. to emulate them, SING changes its normal behaviour about the IP header flags, the TTL, the initial ICMP sequence number, the ICMP id and the ICMP data that each OS send. these techniques are aplied only when using Echo Request or Echo Reply types.
main character energy fr β but only for Echo Request / Echo Reply, don't forget π
π RETURN VALUES π
sing can be easily used within shell scripts. program returns the following values to the shell:
0β Received at least 1 response from destination host.1β General Error.2β Packet sent OK but received no response.3β Out of memory.
πΈ EXAMPLES πΈ
this is the part you actually came for, bestie. every single one, verbatim, slay π
- testing if
www.solarisbox.xxis running the Solaris OS. supposed no filter methods:
sing -mask -O www.solarisbox.xx
- testing if
www.winbox.xxis running the Window$ OS:
sing -O www.winbox.xx
- send Echos with garbage size of 32 bytes and fragments of 8 bytes to host
www.provatina.xx:
sing -s 32 -F 8 www.provatina.xx
- send Echos with data pattern
IsSiNgand fragments of 8 bytes to the hostwww.provatina.xxusing Loose Source Routing viarouter1.xxandrouter2.xx:
sing -p IsSiNg -F 8 router1.xx@router2.xx@www.provatina.xx
- send an ICMP packet Timestamp to host
sepultura.hell. we spoof as host10.2.3.1:
sing -tstamp -S 10.2.3.1 sepultura.hell
- send an ICMP packet Router Solicitation to
10.13.1.0:
sing -rts 10.13.1.0
- send an ICMP Router Advertisement to host
death.es, saying that the routers to use are:router1.xtcwith preference 20,router2.xtcwith preference 50 androuter3.xtcwith default preference (0). we spoof asfatherouter.xtc:
sing -rta router1.xtc/20 -rta router2.xtc/50 -rta router3.xtc -S
fatherouter.xtc death.es
- in response to a packet send with TCP source port 100 and destination on port 90, we want to send and ICMP Redirect to
dwdwah.xxto modify its routing table with the following data:10.12.12.12as a gateway to the hostdeath.esmasking the packet source as if it was sent frominfect.comxhost:
sing -red -S infect.comx -gw 10.12.12.12 -dest death.es -x host -prot
tcp -psrc 100 -pdst 90 dwdwah.xx
- in response to an ICMP packet Echo Request sent with Echo Request id 100 and Echo Request sequence number 90, we want to send an ICMP Redirect to the host
araya.xxto modify its routing table with the following data: the hostpizza.deathas a gateway to the hostdeath.es, masking the packet source as if it was sent frominfect.comxhost.
sing -red -S infect.comx -gw pizza.death -dest death.es -x host -prot
icmp -ip_id 100 -ip_seq 90 araya.xx
- we want to send an ICMP packet Destination Unreach to the host
10.2.3.4saying that our TCP port number 20 connected with its TCP port 2100, is unreachable. we mask ourselves as host10.1.1.1:
sing -du -S 10.1.1.1 -x port-unreach -prot tcp -psrc 2100 -pdst 20
10.2.3.4
- we want to send an ICMP packet Destination Unreach to host
10.2.3.4saying that the hostinferno.helland its TCP port 69, connected with his port TCP 666 in unreachable. we mask ourselves as gatewayrouter.comx:
sing -du -S router.comx -x host-unreach -prot tcp -psrc 666 -pdst 69
-orig inferno.hell 10.2.3.4
- we want to send a packet ICMP Source Quench to host
ldg02.hellin response to a packet destinated to hostldg00with UDP protocol, source port 100 and destination port 200. we mask ourselves as gateway10.10.10.1:
sing -sq -S 10.10.10.1 -prot udp -psrc 100 -pdst 200 -orig ldg00
ldg02.hell
- we want to send an ICMP packet Time Exceeded to host
ldg02.hellin response to a packet destinated to hostldg00with UDP protocol, source port 100 and destination port 200. we mask as gatewayldg04.hell:
sing -tx -S ldg04.hell -x frag -prot udp -psrc 100 -pdst 200 -orig ldg00
ldg02.hell
- we want to send an ICMP packet Address Mask Request and wait 10 seconds between sending each packet. we mask the packet with source address of
10.2.3.4and we send it to the address10.0.1.255:
sing -mask -S 10.2.3.4 -T 10 10.0.1.255
- we want to send an ICMP packet Information Request to host
deep.hell:
sing -info deep.hell
- we want to send an ICMP packet Echo Request to host
black.hellwith the data pattern 'MyNameIsGump':
sing -p MyNameIsGump black.hell
- we want to send ICMP packet Echo Request to
10.12.0.255with the following data pattern: D E A T H (blanks included). we will mask the source address as192.168.0.255:
sing -S 192.168.0.255 -p 'D E A T H' 10.12.0.255
- we want to send an ICMP packet Destination Unreach to host
destination.deathbut sending it with an ICMP code bigger to the legal ones adding also 60K of garbage data:
sing -du -x max -s 60000 destination.death
- we send an ICMP Parameter Problem to host
misery.essaying that the packet sent from the hostdump.xorgwith udp protocol, source port 13 and destination port 53, has an error on the IP header byte 13. we will also add all garbage bytes as possible:
sing -S dump.xorg -param -ptr 13 -prot udp -psrc 13 -pdest 53 -s max
misery.es
- we want to send an ICMP packet Timestamp to host
www.danz.hellwith code 38 instead of code (0) as usual:
sing -tstamp -x 38 www.danz.hell
- same as above without code 38 and using Loose Source Routing between the routers cisco,
10.13.1.1andwakeup.man:
sing -tstamp cisco@10.13.1.1@wakeup.man@www.danz.hell
- same as above using Strict Source Routing between the gateways:
sing -tstamp cisco%10.13.1.1%wakeup.man%www.danz.hell
- using Record Route IP Option to see the route that takes to
ftp.target.xx:
sing -R ftp.target.xx
π SEE ALSO π
- 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.
- Arkin, Ofir, "ICMP usage in scanning", http://www.sys-security.com/archive/papers/ICMP_Scanning.pdf, Sys-Security Group, July 2000.
- The Linux source code, everything referent to network code and to ICMP protocol.
π AUTHOR π
the original ping command was written by Mike Muuss.
sing is original from Alfredo Andres Omella, Slay <aandres@s21sec.com>
and that's the whole page, bestie!! π«Ά this was sing v1.1, dated $Date: 2001/02/13 10:51:31 $, and it's SING(8) β go ping something ethically, ily, bye πβ¨π
π¦ where this page comes from
- fedora 43: sing 1.1-33.fc43 Β· GPL-2.0-or-later
- fedora 44: sing 1.1-34.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms