📄 readme
字号:
gag - a stacheldraht agent detector"gag" is a program to scan for "stacheldraht" agents, which are partof an active "stacheldraht" network. It will NOT detect trinoo,the original Tribe Flood Network (TFN), or TFN2K agents.A newer tool that scans for these other tools as well is "dds": http://staff.washington.edu/dittrich/misc/ddos_scan.tarTo be honest, I would recommend using an even newer and more generaltool, RID, by David Brumley of Stanford University. You can find alink to RID source, and other resources on DDoS attacks, onthe following page: http://staff.washington.edu/dittrich/misc/ddos/For a background on detecting trinoo and Tribe Flood Network, seethose analyses: http://staff.washington.edu/dittrich/misc/trinoo.analysis http://staff.washington.edu/dittrich/misc/tfn.analysis(Why "gag"? Its supposed to be a running joke I started in the trinooanalysis. trinoo/trinot, "tribe"/civilize, gag/sicken&gesundheit!.Read the ddos trilogy to find out!)See CHECKSUMS.asc for PGP signed MD5 checksums.-------------------------------------------------------------------------NOTE: "gag" is continuing to undergo development, in the form ofa new, more general program named "dds" (for "Distributed DoSScanner") that scans for active trinoo, TFN, and stacheldraht agents.This program is still in beta testing, but can be found at: http://staff.washington.edu/dittrich/misc/ddos_scan.tar-------------------------------------------------------------------------Usage=====This program is known to compile and run on at least the followingoperating systems: * Linux (kernel 2.2.x) * Solaris 2.6 or higher (Solaris 2.5 seems to be missing inet_aton()) * Digital Unix 4.0d * IBM AIX 4.2 * FreeBSD 3.3-ReleaseYou may need to edit the Makefile to define the libraries necessaryto compile the program. The default should work for Sun Solarissystems.You must run "gag" as root, as it needs to open a raw mode socket.(If you don't trust running the code as root, which you *should*be wary of doing if someone asks you, the source file is thereto check.)Say you have a network of subnets, all sharing a common networkaddress of 198.162. To scan this entire /16 network, you woulduse the command: # ./gag 198.162.0.0/16If you instead wish to just scan the 24 bit subnet 198.162.1, youwould use the command: # ./gag 198.162.1.0/24To scan a single host, just give its IP address (/32 is assumed): # ./gag 198.162.1.1If gag is able to find an active stacheldraht agent, it will report asfollows: # ./gag 192.168.1.0/24 Received sicken from 192.168.1.202If gag does not find an active stacheldraht agent, it will returnnothing. You can use verbose mode if you really want to see itreport each time it sends a packet, like this: # ./gag -v 192.168.1.0/24 Mask: 24 Target: 192.168.1.0 gag $Revision: 1.8 $ - scanning... Probing address 192.168.1.1 Probing address 192.168.1.2 . . . Received sicken from 192.168.1.202 . . . Probing address 192.168.1.254If you do this, realize that scanning a /24 subnet will generate254+ lines, so you will probably need to run "script" to capture allthe output.If gag receives an ICMP_ECHOREPLY packet that happens to have the sameID value (669) as a stacheldraht agent produces, but without theword "sicken" in the data portion of the packet, it just reports thatit "Got a packet from ..." This is not the same as detecting astacheldraht agent. Please read the analysis of stacheldraht tounderstand what this tool is doing.Caveats=======This program MAY NOT DETECT agents that are not part of an activenetwork. In other words, if a staacheldraht agent is installed on asystem, but there is no handler currently running to control it, itmay not respond to the packets sent by this program.This program WILL NOT DETECT agents which have had the default valueschanged for handler/agent "command" communication.Because of these limitations, a negative response DOES NOT GUARANTEEyou have no agents on your network.Even if you do detect stacheldraht agents, you may find it difficultto locate them due to "root kits" installed on the system. Thismay require that you use file system integrity checking techniques,or otherwise identify the modified files. A write-up on root kitscan be found at: http://staff.washington.edu/dittrich/misc/faq/rootkits.faqA complementary tool that will scan the local filesystem forhandlers/agents on Solaris systems is provided by the NationalInfrastructure Protection Center. See: http://www.fbi.gov/nipc/trinoo.htmFor more information, see: http://www.cert.org/advisories/CA-2000-01.html http://www.cert.org/reports/dsit_workshop.pdfYou should take care to NOT SCAN networks that you do NOT OWN ANDCONTROL. People will get very angry with you if you do this. Thistool was intended to be used by network administrators and incidentresponse teams for scanning internal networks.You should also coordinate your activities with other groups thatshare the use of, or administration of, your network.If you find agents with this tool, you have identified the bottom tierof a distributed network, which may contain hundreds (as many as athousand) of other agents at various sites. Proper forensicprocedures, to gather evidence about which computers (most likely atother sites) are acting as the handlers of the network, which willthen lead to the other agents. You should remove the system from thenetwork, and perform a backup of the system immediately, to ensure youtake the system out of the control of the attackers who compromisedit, and to preserve evidence. More information on responding to rootlevel compromise can be found in the CERT advisory mentioned above.CREDITS=======I can only take credit for the analysis of stacheldraht, and theinitial version of this program, which was hacked together from thestacheldraht source code. Significant modifications were made byMarcus Ranum of Network Flight Recorder and others. It would nothave been possible to get the program to this level, this fast,without their assistance (which is greatly appreciated!)LEGALESE========This software should only be used in compliance with all applicable laws andthe policies and preferences of the owners of any networks, systems, or hostsscanned with the softwareThe developers and licensors of the software provide the software on an "asis" basis, excluding all express or implied warranties, and will not be liablefor any damages arising out of or relating to use of the software.THIS SOFTWARE IS MADE AVAILABLE "AS IS", AND THE UNIVERSITY OF WASHINGTONDISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO THIS SOFTWARE,INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY ANDFITNESS FOR A PARTICULAR PURPOSE, AND IN NO EVENT SHALL THE UNIVERSITY OFWASHINGTON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANYDAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ANACTION OF CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISINGOUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -