advanced network reconnaissance with nmap · advanced network reconnaissance with nmap by fyodor...
Embed Size (px)
TRANSCRIPT
-
Insecure.OrgInsecure.Org
AdvancedNetworkReconnaissancewithNmap
http://www.insecure.org/presentations/Shmoo06/ShmooCon;Jan14,2006
-
Insecure.OrgInsecure.Org
Mission#1
PenetrateSCO'sFirewalltodiscernalltheopenTCPportson
Docsrv.Caldera.Com
-
Insecure.OrgInsecure.Org
SYNScanagainstDocSRV#nmapsST4docsrv.caldera.comStartingNmap3.97Shmoo(http://www.insecure.org/nmap/)Interestingportsondocsrv.caldera.com(216.250.128.247):(The1669portsscannedbutnotshownbelowareinstate:filtered)PORTSTATESERVICE80/tcpopenhttp113/tcpclosedauth507/tcpopencrs
Nmapfinished:1IPaddress(1hostup)scannedin24.490seconds
-
Insecure.OrgInsecure.Org
FINScanagainstDocSRV#nmapsFT4docsrv.caldera.comStartingNmap3.97Shmoo(http://www.insecure.org/nmap/)Interestingportsondocsrv.caldera.com(216.250.128.247):(The1632portsscannedbutnotshownbelowareinstate:closed)PORTSTATESERVICE7/tcpopen|filteredecho9/tcpopen|filtereddiscard11/tcpopen|filteredsystat13/tcpopen|filtereddaytime15/tcpopen|filterednetstat19/tcpopen|filteredchargen21/tcpopen|filteredftp22/tcpopen|filteredssh23/tcpopen|filteredtelnet25/tcpopen|filteredsmtp37/tcpopen|filteredtime79/tcpopen|filteredfinger80/tcpopen|filteredhttp[manyportscut]135/tcpopen|filteredauth
-
Insecure.OrgInsecure.Org
ACKScanagainstDocSRV#nmapsAT4docsrv.caldera.comStartingNmap3.97ShmooInterestingportsondocsrv.caldera.com(216.250.128.247):(The1669portsscannedbutnotshownbelowareinstate:UNfiltered)PORTSTATESERVICE135/tcpfilteredmsrpc1434/tcpfilteredmssqlm32777/tcpfilteredsometimesrpc17
Nmapfinished:1IPaddress(1hostup)scannedin3.134seconds
-
Insecure.OrgInsecure.Org
WindowScanagainstDocSRV#nmapsWpT4docsrv.caldera.comStartingNmap3.97Shmoo(http://www.insecure.org/nmap/)Interestingportsondocsrv.caldera.com(216.250.128.247):(The65479portsscannedbutnotshownbelowareinstate:closed)PORTSTATESERVICE7/tcpopenecho9/tcpopendiscard11/tcpopensystat13/tcpopendaytime15/tcpopennetstat19/tcpopenchargen21/tcpopenftp22/tcpopenssh23/tcpopentelnet25/tcpopensmtp37/tcpopentime79/tcpopenfinger80/tcpopenhttp110/tcpopenpop3111/tcpopenrpcbind135/tcpfilteredmsrpc143/tcpopenimap
-
Insecure.OrgInsecure.Org
Mission#2
SneakpastalloftheNmaprelatedSnortIDSRules
-
Insecure.OrgInsecure.Org
NmapSpecificSnortRules~/snortrulespr2.4/rules>egrepi'alert.*nmap'*.rulesicmp.rules:alerticmp$EXTERNAL_NETany>$HOME_NETany(msg:"ICMPPINGNMAP";dsize:0;itype:8;reference:arachnids,162;classtype:attemptedrecon;sid:469;rev:3;)scan.rules:alerttcp$EXTERNAL_NETany>$HOME_NETany(msg:"SCANnmapXMAS";flow:stateless;flags:FPU,12;reference:arachnids,30;classtype:attemptedrecon;sid:1228;rev:7;)webattacks.rules:alerttcp$EXTERNAL_NETany>$HTTP_SERVERS$HTTP_PORTS(msg:"WEBATTACKSnmapcommandattempt";flow:to_server,established;content:"nmap%20";nocase;classtype:webapplicationattack;sid:1361;rev:5;)deleted.rules:alerttcp$EXTERNAL_NETany>$HOME_NETany(msg:"SCANnmapTCP";ack:0;flags:A,12;flow:stateless;reference:arachnids,28;classtype:attemptedrecon;sid:628;rev:7;)deleted.rules:alerttcp$EXTERNAL_NETany>$HOME_NETany(msg:"SCANnmapfingerprintattempt";flags:SFPU;flow:stateless;reference:arachnids,05;classtype:attemptedrecon;sid:629;rev:6;)
-
Insecure.OrgInsecure.Org
FlowportscanFixedWindow~/snort2.2.0/etc>grep'scannerfixed'snort.conf#scannerfixedthreshold15\#scannerfixedwindow15\
-
Insecure.OrgInsecure.Org
DefeatingFixedWindowScanDetection#foreachtarget(205.217.153.53205.217.153.54205.217.153.55)foreach?nmapscan_delay1075max_retries0max_hostrgoup1P0p21,22,23,25,53$targetforeach?usleep1075000foreach?end
-
Insecure.OrgInsecure.Org
FlowportscanSlidingWindow~/snort2.2.0/etc>grepscannerslidingsnort.conf#scannerslidingthreshold40\#scannerslidingwindow20\#scannerslidingscalefactor0.50\
-
Insecure.OrgInsecure.Org
DefeatingSnortSliding&FixedWindowDetectionfelix~#foreachtarget(205.217.153.53205.217.153.54205.217.153.55)foreach?nmapmin_parallelism15max_retries0P0p21,22,23,25,53$targetforeach?usleep23000000foreach?end
-
Insecure.OrgInsecure.Org
AnotherOption:JustExploittheThing
TrytheSnortBackOrificePreprocessorExploit:
http://www.frsirt.com/exploits/20051025.THCsnortbo.c.php
-
Insecure.OrgInsecure.Org
Don'tForgetDecoys(D)
-
Insecure.OrgInsecure.Org
AlsoDon'tForget
Exoticscanflags(scanflags) Sourceportmanipulation(g) Ipv6(6) IPIDIdleScanning(sI) Fragmentation(f,mtu) Proxies SourceRouting Etc.
-
Insecure.OrgInsecure.Org
Finally,HaveSomeFunWithIt
-
Insecure.OrgInsecure.Org
SingleServiceDiscovery
-
Insecure.OrgInsecure.Org
Mission#3
Locatewebserver(s)onthePlayboy.Comnetworkofferingfreeimages
-
Insecure.OrgInsecure.Org
Step1:FindNetworktoScanStep1:Findthenetworktoscan
core~>whoishwhois.arin.netnplayboy[...]OrgName:PlayboyOrgID:PLAYBOAddress:680N.LakeShoreDriveCity:ChicagoStateProv:ILPostalCode:60611Country:US
NetRange:216.163.128.0216.163.143.255CIDR:216.163.128.0/20[...]
-
Insecure.OrgInsecure.Org
InitialTrynmapP0p80oGpb.gnmap216.163.128.0/20Startingnmap3.81[...]Nmapruncompleted4096IPaddresses(4096hostsup)scannedin1236.309seconds
-
Insecure.OrgInsecure.Org
HelpNmapOutwithTimingInformation>hostwww.playboy.comwww.playboy.comhasaddress209.247.228.201
Mailservers(hosttmxplayboy.com):mx.la.playboy.com.10216.163.128.15mx.chi.playboy.com.5216.163.143.4
-
Insecure.OrgInsecure.Org
PingKnownHostsforRTTEstimates>pingc5mx.chi.playboy.comPINGmx.chi.playboy.com(216.163.143.4)56(84)bytesofdata.mx.chi.playboy.compingstatistics5packetstransmitted,0received,100%packetloss,time4000ms
>pingc5mx.la.playboy.comPINGmx.la.playboy.com(216.163.128.15)56(84)bytesofdata.mx.la.playboy.compingstatistics5packetstransmitted,0received,100%packetloss,time4011ms
-
Insecure.OrgInsecure.Org
PerhapsTCPPingWillWorkBetter#hping2synp25c5mx.chi.playboy.comHPINGmx.chi.playboy.com(eth0216.163.143.4)46bytesfrom216.163.143.4:flags=SA46bytesfrom216.163.143.4:flags=SA[cut]mx.chi.playboy.comhpingstatistic5packetstransmitted,5packetsreceivedroundtripmin/avg/max=56.8/58.0/61.8ms
#hping2synp25c5mx.la.playboy.comHPINGmx.la.playboy.com(eth0216.163.128.15)46bytesfrom216.163.128.15:flags=SA46bytesfrom216.163.128.15:flags=SA[cut]mx.la.playboy.comhpingstatistic5packetstransmitted,5packetsreceivedroundtripmin/avg/max=15.4/15.8/16.4ms
-
Insecure.OrgInsecure.Org
DesigningaFasterScannmapT4max_rtt_timeout200initial_rtt_timeout150min_hostgroup512P0p80oGpb2.gnmap216.163.128.0/20
-
Insecure.OrgInsecure.Org
ReLaunchtheScan#nmapT4max_rtt_timeout200initial_rtt_timeout150min_hostgroup512P0p80oGpb2.gnmap216.163.128.0/20Startingnmap3.81[...]Nmapruncompleted4096IPaddresses(4096hostsup)scannedin868.714seconds
Muchbetterthan1236s,butleavesroomforimprovement
-
Insecure.OrgInsecure.Org
Upgradeto3.97Shmoo+max_retries#nmapT4max_rtt_timeout200initial_rtt_timeout150min_hostgroup512max_retries0P0p80oGpb3.gnmap216.163.128.0/20Startingnmap3.97Shmoo[...]Nmapruncompleted4096IPaddresses(4096hostsup)scannedin289.579seconds
Under5Minutes!
-
Insecure.OrgInsecure.Org
SkipDNS#nmapT4max_rtt_timeout200initial_rtt_timeout150min_hostgroup512max_retries0nP0p80oGpb3.gnmap216.163.128.0/20Startingnmap3.97Shmoo[...]Nmapruncompleted4096IPaddresses(4096hostsup)scannedin46.052seconds
-
Insecure.OrgInsecure.Org
TimefortheResults!>grep80/openpb3.gnmap|awk'{print$2}'216.163.129.20216.163.136.21216.163.136.22216.163.136.27216.163.136.29216.163.136.30216.163.136.31216.163.137.3216.163.137.4216.163.137.5216.163.137.6216.163.137.7216.163.137.8216.163.137.9216.163.137.10216.163.137.11216.163.137.12216.163.137.13216.163.137.14216.163.137.15216.163.137.16216.163.137.17216.163.137.18216.163.137.19216.163.137.20216.163.137.21216.163.137.22216.163.137.23216.163.137.25216.163.137.26216.163.137.27216.163.140.20216.163.143.11
-
Insecure.OrgInsecure.Org
AddVersionDetection(sV)########mydoombackdoorPROBE###########ProbeTCPmydoomq|\\x0d\\x0d|ports31273198matchmydoomm|\\x04\\x5b\\0\\0\\0\\0\\0\\0|p/mydoom/v/v012604/
-
Insecure.OrgInsecure.Org
Nmap3.97Shmoo Downloadthegoodsfrom
http://www.insecure.org/presentations/Shmoo06/ FeaturesSince3.95:
RuntimeInteraction ParallelreverseDNS CorruptTCP/UDPchecksumoption(badsum) max_retries
-
Insecure.OrgInsecure.Org
FeaturesSince3.50 ARPScanningandSpoofing Rewrotecoreportscanningengine DietNmap Brandnewmanpage/referenceguide,in7
languagessofar HugeversiondetectionDBupdate(from1,000to
3,000signatures) VersiondetectionnowgathersOS,devicetype,
andhostname
-
Insecure.OrgInsecure.Org
FeaturesSince3.50(Cont'd) Versiondetectionrarity(version_light,
version_all,version_intensity) MassiveOSdetectionupdate(grewmorethan
50%to1,684fingerprints) DramaticWindowsperformanceimprovements
nowsendsviaNDISdriver. MACAddressPrinting 'l33tASCIIartinconfigurator XSLstylesheetforHTMLoutput
-
Insecure.OrgInsecure.Org
FeaturesSince3.50(Cont'd) open|filteredandclosed|filteredstates Completiontimeestimates NmapFEportedtoGTK2
-
Insecure.OrgInsecure.Org
TopNmapContributorsSince3.50AdamKerrison,AdamMorgan,AdrianoMonteiroMarques,AlanBishoff,AlanWilliamSomers,AlbertChin,AlokTangoankar,AmyHennings,AndersThulin,AndreiaGaita,AndyLutomirski,AnnaleeNewitz,ArturoBuanzoBusleiman,BartDopheide,BeirneKonarski,BenHarris,BillDale,BillPetersen,BillPollock,BoJiang,BrianHatch,ChadLoder,ChrisGibson,Christophe,CraigHumphrey,CurtisDoty,DanaEpp,DirkMueller,DougHoyte,DragosRuiu,DugSong,DuilioJ.Protti,EricS.Raymond,FelixGrbert,FlorianEbner,FyodorYarochkin,GangaBhavani,GisleVanem,GlynGeoghegan,GregA.Woods,GregDarke,GregTaleck,GwenoleBeauchesne,HDMoore,Jedi/SectorOne,JeffNathan,JesseBurns,JimCarras,JimHarrison,JonathanDieter,JosDomingos,JustinCranford,JustinMCacak,Krok,KX,LamontJones,LanceSpitzner,LaurentEstieux,LionelCons,LucienRaven,MadHat,MariusStrobl,MarkDavidMcLaughlin,MarkRuef,MartinMacok,MatthieuVerbert,MattSelsky,MaxSchubert,MeethuneBhowmick,Mephisto,MikeBasinger,MikeHatz,Murphy,Netris,OkanDemirmen,OleMortenGrodaas,OliverEikemeier,PascalTrouvin,PaulTarjan,PetrSalinger,PetterReinholdtsen,pijntrein,PingHuang,PiotrSobolewski,PriitLaes,PrincessNadia,RavenAlder,RichardBirkett,RichardMoore,RobertE.Lee,RobFoehl,RonakSutaria,RoyceWilliams,RuedigerRissmann,SaintXavier,Saravanan,ScottMansfield,SebastianWolfgarten,SethMaster,ShahidKhan,SimonBurr,SimpleNomad,SinaBahram,SolarDesigner,Srivatsan,StephaneLoeuillet,StephenBishop,SteveChristensen,SteveMartin,ThorstenHolz,TomDuffy,TomRuneFlo,TomSellers,TonyGolding,vanHauser,vlad902,WilliamMcVey,ZhaoLei
-
Insecure.OrgInsecure.Org
Questions?AnyquestionsaboutNmap,NetworkReconnaissance,oranythingelse?