Published on

1 Comment
  • More than 5000 IT Certified ( SAP,Oracle,Mainframe,Microsoft and IBM Technologies etc...)Consultants registered. Register for IT courses at http://www.todaycourses.com Most of our companies will help you in processing H1B Visa, Work Permit and Job Placeme
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Reconnaissance
  2. 2. Attack Phases <ul><li>Phase 1: Reconnaissance </li></ul><ul><li>Phase 2: Scanning </li></ul><ul><li>Phase 3: Gaining access </li></ul><ul><ul><li>Application/OS attacks </li></ul></ul><ul><ul><li>Network attacks/DoS attacks </li></ul></ul><ul><li>Phase 4: Maintaining access </li></ul><ul><li>Phase 5: Covering tracks and hiding </li></ul>
  3. 3. Recon <ul><li>Before bank robber robs a bank… </li></ul><ul><ul><li>Visit the bank </li></ul></ul><ul><ul><li>Make friends with an employee (inside info) </li></ul></ul><ul><ul><li>Study alarm system, vault, security guard’s routine, security cameras plscement, etc. </li></ul></ul><ul><ul><li>Plan arrival and get away </li></ul></ul><ul><li>Most of this is not high tech </li></ul><ul><li>Similar ideas hold for info security </li></ul>
  4. 4. Social Engineering <ul><li>Hypothetical examples </li></ul><ul><ul><li>New “admin” asks secretary for help </li></ul></ul><ul><ul><li>Angry “manager” calls employee/admin asking for password </li></ul></ul><ul><ul><li>“ Employee” in the field calls another employee for help with remote access </li></ul></ul><ul><li>Real-world examples </li></ul><ul><ul><li>Employees help white hat guy steal company IP </li></ul></ul><ul><ul><li>Person turns over secrets to trusted “friend” </li></ul></ul>
  5. 5. Social Engineering <ul><li>Social engineering </li></ul><ul><ul><li>Defeats strongest crypto, best access control, protocols, IDS, firewalls, software security, etc., etc. </li></ul></ul><ul><li>Attacker may not even touch keyboard </li></ul><ul><li>Ultimate low-tech recon/attack method </li></ul>
  6. 6. Social Engineering <ul><li>Telephone based attacks </li></ul><ul><ul><li>Company phone number may give attacker instant credibility </li></ul></ul><ul><li>Attacker might ask for voice mail service </li></ul><ul><li>Spoofed caller ID </li></ul><ul><ul><li>Appears attacker has company phone number </li></ul></ul><ul><ul><li>Online services: Telespoof, Camophone </li></ul></ul><ul><ul><li>Some VoIP software </li></ul></ul><ul><ul><li>Phone companies also sell such services </li></ul></ul>
  7. 7. Camophone <ul><li>Spoofed caller ID </li></ul><ul><li>Cost? </li></ul><ul><li>5 cents per minute </li></ul>
  8. 8. Social Engineering Defenses <ul><li>Hard to defend against </li></ul><ul><ul><li>Rooted in human nature </li></ul></ul><ul><ul><li>Many legitimate uses of “social engineering” (police, sales people, etc.) </li></ul></ul><ul><li>User education helps </li></ul><ul><ul><li>Do not give out sensitive info (passwords) </li></ul></ul><ul><ul><li>Do not trust caller ID, etc. </li></ul></ul><ul><li>May not want totally paranoid employees </li></ul>
  9. 9. Physical Security <ul><li>If Trudy gets physical access… </li></ul><ul><li>Might find logged in computer, post-it note with passwords, etc. </li></ul><ul><li>Might install back door, keystroke logger, access point to LAN, etc. </li></ul><ul><li>Could steal USB drives, laptop, computers, CDs, etc. </li></ul>
  10. 10. Physical Access <ul><li>How can attacker gain physical access? </li></ul><ul><ul><li>Ask for it </li></ul></ul><ul><ul><li>Fake it </li></ul></ul><ul><ul><li>Physical break in </li></ul></ul><ul><li>Or attacker might be employee </li></ul><ul><ul><li>Then Trudy already has access </li></ul></ul><ul><ul><li>Limit employee’s physical access? </li></ul></ul>
  11. 11. Defenses <ul><li>Require badges for entry </li></ul><ul><ul><li>What if someone forgets badge? </li></ul></ul><ul><li>Biometrics for entry are useful </li></ul><ul><ul><li>Iris scan, hand geometry, … </li></ul></ul><ul><li>Monitor what people take in/out </li></ul><ul><ul><li>Laptop, USB drive, CD, Furby ? </li></ul></ul><ul><ul><li>Miniaturization makes this difficult </li></ul></ul>
  12. 12. Defenses <ul><li>Use locks on file cabinets </li></ul><ul><ul><li>Don’t leave key in the lock… </li></ul></ul><ul><li>Automatic screen saver with pwd </li></ul><ul><li>Encrypted hard drives </li></ul><ul><ul><li>Especially for those who travel </li></ul></ul><ul><ul><li>Need a way to recover encrypted files </li></ul></ul><ul><ul><li>But there are attacks … </li></ul></ul>
  13. 13. Dumpster Diving <ul><li>What might Trudy find in trash? </li></ul><ul><ul><li>CDs, DVDs, discarded machines, USB, … </li></ul></ul><ul><ul><li>Diagrams of network architecture </li></ul></ul><ul><li>Defenses </li></ul><ul><ul><li>Destroy hard drive before discarding </li></ul></ul><ul><ul><li>Destroy media (degaussing is not enough) </li></ul></ul><ul><ul><li>Shred paper, etc. </li></ul></ul>
  14. 14. Search the “Fine” Web <ul><li>“ Fine” is placeholder for another word </li></ul><ul><ul><li>As in “Read the ‘Fine’ Documentation” </li></ul></ul><ul><li>Huge amount of info available on Web </li></ul><ul><li>Google it! </li></ul><ul><ul><li>For example Google the MD5 hash value </li></ul></ul><ul><ul><li>20f1aeb7819d7858684c898d1e98c1bb </li></ul></ul>
  15. 15. Google Hacking <ul><li>Using Google to help in attacks </li></ul><ul><ul><li>Not “hacking Google” </li></ul></ul><ul><li>See, for example </li></ul><ul><ul><li>Johnny Long’s Website </li></ul></ul><ul><ul><li>Google hacking 101 </li></ul></ul><ul><li>Google selected as “favorite hacking tool” by some infamous hackers </li></ul>
  16. 16. Google <ul><li>Four important elements of Google </li></ul><ul><li>Google bot </li></ul><ul><ul><li>Crawls Web looking for info to index </li></ul></ul><ul><li>Google index </li></ul><ul><ul><li>Billions served… </li></ul></ul><ul><ul><li>Ranked using (secretive) algorithm </li></ul></ul><ul><ul><li>Why so secretive? </li></ul></ul>
  17. 17. Google <ul><li>Google cache </li></ul><ul><ul><li>Copy of data that bots found </li></ul></ul><ul><ul><li>Includes html, doc, pdf, ppt, etc., etc. </li></ul></ul><ul><ul><li>Up to 101k of text each, no images </li></ul></ul><ul><ul><li>See also, Wayback Machine </li></ul></ul><ul><li>Google API </li></ul><ul><ul><li>Program need to Google too </li></ul></ul><ul><ul><li>Requires API “key” (free from Google) </li></ul></ul><ul><ul><li>Limited to 1k searches per day </li></ul></ul>
  18. 18. Google <ul><li>For any Google search… </li></ul><ul><ul><li>Max number of results limited to 1,000 </li></ul></ul><ul><ul><li>Limits data mining capabilities </li></ul></ul><ul><li>So searches must be precise </li></ul><ul><li>Use “search directives” </li></ul><ul><ul><li>No space after directive, searches case insensitive, max of 10 search terms </li></ul></ul>
  19. 19. Google Search Directives <ul><li>site:[domain] </li></ul><ul><ul><li>Searches particular domain </li></ul></ul><ul><ul><li>site:cs.sjsu.edu stamp </li></ul></ul><ul><li>link:[web page] </li></ul><ul><ul><li>All sites linked to a given web page </li></ul></ul><ul><ul><li>link:www.cs.sjsu.edu </li></ul></ul><ul><li>intitle:[term(s)] </li></ul><ul><ul><li>Web sites that include “term(s)” in title </li></ul></ul><ul><ul><li>site:cs.sjsu.edu intitle:”index of” stamp </li></ul></ul>
  20. 20. Google Search Directives <ul><li>related:[site] </li></ul><ul><ul><li>Similar sites, based on Google’s indexing </li></ul></ul><ul><ul><li>related:www.cs.sjsu.edu </li></ul></ul><ul><li>cache:[page] </li></ul><ul><ul><li>Display Web page from Google’s cache </li></ul></ul><ul><ul><li>cache:www.cs.sjsu.edu </li></ul></ul><ul><li>filetype:[suffix] </li></ul><ul><ul><li>Like ppt, doc, etc. </li></ul></ul><ul><ul><li>filetype:ppt site:cs.sjsu.edu stamp </li></ul></ul>
  21. 21. Google Search Directives <ul><li>rphonebook:[name and city or state] </li></ul><ul><ul><li>Residential phone book </li></ul></ul><ul><ul><li>rphonebook:Mark Stamp Los Gatos </li></ul></ul><ul><li>bphonebook:[name and city or state] </li></ul><ul><ul><li>Business phone book </li></ul></ul><ul><li>phonebook:[name and city or state] </li></ul><ul><ul><li>Residential and business phone books </li></ul></ul>
  22. 22. Other Search Operations <ul><li>Literal match (“ ”) </li></ul><ul><ul><li>“ metamorphic engines” site:cs.sjsu.edu </li></ul></ul><ul><li>Not (-) </li></ul><ul><ul><li>Filter out sites that include term </li></ul></ul><ul><ul><li>site:cs.sjsu.edu -ty -lin </li></ul></ul><ul><li>Plus (+) </li></ul><ul><ul><li>Include (normally filtered) term </li></ul></ul><ul><ul><li>Not the opposite of “+” </li></ul></ul><ul><ul><li>site:cs.sjsu.edu stamp +the </li></ul></ul>
  23. 23. Interesting Searches <ul><li>From the text </li></ul><ul><ul><li>site:mybank.com filetype:xls ssn </li></ul></ul><ul><ul><li>site:mybank.com ssn -filetype:pdf </li></ul></ul><ul><ul><li>site:mybank.com filetype:asp </li></ul></ul><ul><ul><li>site:mybank.com filetype:cgi </li></ul></ul><ul><ul><li>site:mybank.com filetype:php </li></ul></ul><ul><ul><li>site:mybank.com filetype:jsp </li></ul></ul><ul><ul><li>site:cs.sjsu.edu filetype:xls </li></ul></ul>
  24. 24. Google Hacking Database <ul><li>Google Hacking Database (GHDB) </li></ul><ul><li>Interesting searches </li></ul><ul><ul><li>intitle:”index of” finance.xls </li></ul></ul><ul><ul><li>“ welcome to intranet” </li></ul></ul><ul><ul><li>intitle:”gateway configuration menu” </li></ul></ul><ul><ul><li>intitle:”samba web administration tool” intext:”help workgroup” </li></ul></ul>
  25. 25. GHDB <ul><li>Intitle:”welcome to IIS 4.0” </li></ul><ul><li>“… w e find that even if they've taken the time to change their main page, some dorks forget to change the titles of their default-installed web pages. This is an indicator that their web server is most likely running … the now considered OLD IIS 4.0 and that at least portions of their main pages are still exactly the same as they were out of the box. Conclusion? The rest of the factory-installed stuff is most likely lingering around on these servers as well. … Factory-installed default scripts: FREE with operating system. Getting hacked by a script kiddie that found you on Google: PRICELESS. For all the things money can't buy, there's a googleDork award.” </li></ul>
  26. 26. Google <ul><li>Suppose sensitive data is accessible </li></ul><ul><ul><li>Removing it does not remove problem </li></ul></ul><ul><ul><li>Google cache, Wayback Machine </li></ul></ul><ul><li>What about automated searches? </li></ul><ul><ul><li>Google API </li></ul></ul><ul><ul><li>SiteDigger and Wikto </li></ul></ul>
  27. 27. SiteDigger <ul><li>User provides Google API key </li></ul><ul><li>One search… </li></ul><ul><ul><li>Uses GHDB </li></ul></ul><ul><ul><li>Does 1k Google searches </li></ul></ul><ul><ul><li>Your daily limit </li></ul></ul><ul><ul><li>There’s always tomorrow… </li></ul></ul>
  28. 28. Google <ul><li>Lots of other interesting Google searches </li></ul><ul><ul><li>Track current flights </li></ul></ul><ul><ul><li>Look up auto VIN </li></ul></ul><ul><ul><li>Look up product UPC </li></ul></ul><ul><li>Google filters some sensitive data </li></ul><ul><ul><li>SSNs, for example </li></ul></ul><ul><li>Yahoo and MSN Search do less filtering </li></ul>
  29. 29. Newsgroups <ul><li>“ Listening in at the virtual water cooler” </li></ul><ul><li>Employees submit detailed questions </li></ul><ul><ul><li>How to configure something </li></ul></ul><ul><ul><li>How to code something </li></ul></ul><ul><ul><li>How to troubleshoot a problem </li></ul></ul><ul><li>Reveals info about products, config, etc. </li></ul><ul><ul><li>“ sensitive information leakage on a grand scale” </li></ul></ul><ul><li>Attacker could even play active role </li></ul><ul><ul><li>Give bad/incorrect advice </li></ul></ul>
  30. 30. Newsgroups <ul><li>To search groups </li></ul><ul><ul><li>groups.google.com </li></ul></ul><ul><ul><li>Repackaged version of DejaNews </li></ul></ul>
  31. 31. Organization’s Website <ul><li>Web site might reveal useful info </li></ul><ul><ul><li>Employee contact info </li></ul></ul><ul><ul><li>Clues about corporate culture/language </li></ul></ul><ul><ul><li>Business partners </li></ul></ul><ul><ul><li>Recent mergers and acquisitions </li></ul></ul><ul><ul><li>Technology in use </li></ul></ul><ul><ul><li>Open jobs </li></ul></ul>
  32. 32. Defenses Against Web Recon <ul><li>Limit what goes on Web pages </li></ul><ul><ul><li>No sensitive info </li></ul></ul><ul><ul><li>Limit info about products, configuration, … </li></ul></ul><ul><li>Security by obscurity? </li></ul><ul><ul><li>“… no sense putting an expensive lock on your door and leaving milk and cookies outside so the lock picker can have a snack” while he breaks in </li></ul></ul>
  33. 33. Defenses Against Web Recon <ul><li>Have a policy on use of newsgroups </li></ul><ul><li>Monitor publicly available info </li></ul><ul><li>Google/Wayback will remove sensitive data </li></ul><ul><li>Use robots.txt so Web pages not indexed </li></ul><ul><ul><li>Tags: noindex, nofollow, noarchive, nosnippet </li></ul></ul><ul><ul><li>Well-behaved crawlers will respect these, but… </li></ul></ul><ul><ul><li>… a sign to bad guys of sensitive data </li></ul></ul>
  34. 34. Whois Databases <ul><li>Internet “white pages” listing </li></ul><ul><ul><li>Domain names, contact info, IP addresses </li></ul></ul><ul><ul><li>.com, .net, .org, .edu </li></ul></ul><ul><li>ICANN oversees registration process </li></ul><ul><ul><li>Hundreds of actual registrars </li></ul></ul>
  35. 35. InterNIC <ul><li>InterNIC (Internet Network Info Center) </li></ul><ul><ul><li>First place to look </li></ul></ul><ul><ul><li>Info on domain name registration services </li></ul></ul>
  36. 36. InterNIC <ul><li>Whois info available from InterNIC </li></ul><ul><ul><li>com,net,org,edu </li></ul></ul><ul><li>Other sites for other top level domains </li></ul>
  37. 37. Whois <ul><li>Once registrar is known, attacker can contact it </li></ul><ul><ul><li>More detailed Whois info </li></ul></ul><ul><ul><li>Network Solutions in this example </li></ul></ul>
  38. 38. Whois <ul><li>Info includes </li></ul><ul><ul><li>Names </li></ul></ul><ul><ul><li>Telephone numbers </li></ul></ul><ul><ul><li>Email addresses </li></ul></ul><ul><ul><li>Name (DNS) servers </li></ul></ul><ul><ul><li>And so on… </li></ul></ul>
  39. 39. IP Address Assignment <ul><li>ARIN (American Registry for Internet Numbers) </li></ul><ul><ul><li>Info about who owns IP address or range of addresses </li></ul></ul><ul><li>Similar organizations for Europe, Asia, Latin America, … </li></ul>
  40. 40. Defense Against Whois Search <ul><li>Bad idea to put false info into databases </li></ul><ul><ul><li>Important that people can contact you </li></ul></ul><ul><ul><li>For example, if attack launched from your site </li></ul></ul><ul><li>No real defense against Whois </li></ul><ul><li>Anonymous registration services exist </li></ul><ul><ul><li>Author is not fond of these </li></ul></ul><ul><ul><li>Better to train against social engineering </li></ul></ul>
  41. 41. Domain Name System <ul><li>DNS </li></ul><ul><ul><li>A hierarchical distributed database </li></ul></ul><ul><ul><li>Like a (hierarchical distributed) telephone directory </li></ul></ul><ul><ul><li>Converts human-friendly names into computer-friendly IP addresses </li></ul></ul><ul><li>Internet is impossible without DNS </li></ul>
  42. 42. DNS <ul><li>13 root DNS servers </li></ul><ul><ul><li>A “single point” of failure for Internet </li></ul></ul>
  43. 43. DNS <ul><li>DNS example </li></ul><ul><ul><li>Recursive and iterative searches </li></ul></ul><ul><ul><li>Resolved locally, if possible </li></ul></ul><ul><ul><li>Lots and lots of caching </li></ul></ul>
  44. 44. DNS <ul><li>DNS cache on Windows machine </li></ul>
  45. 45. DNS <ul><li>Gives IP address of a domain </li></ul><ul><li>Lots of other info </li></ul><ul><li>DNS record types </li></ul><ul><ul><li>Address: domain name/IP address (or vice-versa) </li></ul></ul><ul><ul><li>Host information: info about system </li></ul></ul><ul><ul><li>Mail exchange: mail system info </li></ul></ul><ul><ul><li>Name server: DNS servers </li></ul></ul><ul><ul><li>Text: arbitrary text string </li></ul></ul>
  46. 46. Interrogating DNS <ul><li>Attacker determines DNS servers </li></ul><ul><ul><li>From registrar’s Whois database </li></ul></ul><ul><li>Use nslookup (or dig in Linux) to interrogate name servers </li></ul><ul><ul><li>Zone transfer (all info about domain) </li></ul></ul><ul><ul><li>See example from text --- IP addresses, mail server names, OS types, etc. </li></ul></ul>
  47. 47. DNS Recon Defenses <ul><li>Remove info on OS types, etc. </li></ul><ul><li>Restrict zone transfers </li></ul><ul><ul><li>To primary and secondary name servers </li></ul></ul><ul><li>Employ “split DNS” </li></ul><ul><ul><li>Allow outside DNS activity related to Web, mail, FTP, …, servers </li></ul></ul><ul><ul><li>No outside DNS directly from internal network </li></ul></ul>
  48. 48. Split DNS <ul><li>Internal DNS server acts as proxy </li></ul><ul><ul><li>Relays requests to external DNS </li></ul></ul><ul><ul><li>Internal users can resolve internal and external </li></ul></ul>
  49. 49. General-Purpose Recon Tools <ul><li>Sam Spade </li></ul><ul><ul><li>Detective character in Dashiell Hammett’s novel, The Maltese Falcon </li></ul></ul><ul><ul><li>Humphrey Bogart </li></ul></ul><ul><ul><li>Also a general Web-based recon tool </li></ul></ul><ul><li>Research and attack portals </li></ul><ul><ul><li>For more specific info </li></ul></ul>
  50. 50. Sam Spade <ul><li>All the bells and whistles </li></ul><ul><li>Some of Sam Spade’s capabilities </li></ul><ul><ul><li>ping, whois lookups, IP block whois, nslookup, DNS zone transfer, traceroute, finger </li></ul></ul><ul><ul><li>SMTP VRFY --- is given email address valid? </li></ul></ul><ul><ul><li>Web browser --- view raw HTTP interaction </li></ul></ul><ul><ul><li>Web crawler --- grab entire web site </li></ul></ul>
  51. 51. Sam Spade <ul><li>“The incredibly useful Sam Spade user interface” </li></ul>
  52. 52. Other General Recon Tools <ul><li>Active Whois Browser </li></ul><ul><ul><li>Whois and DNS tool, $19.95 </li></ul></ul><ul><li>NetScanTools Pro </li></ul><ul><ul><li>Costs $249+ </li></ul></ul><ul><li>iNetTools </li></ul><ul><ul><li>Feature-limited, but free </li></ul></ul>
  53. 53. Web-based Recon Tools <ul><li>Some “run by rather shady operators” </li></ul><ul><ul><li>www.samspade.org </li></ul></ul><ul><ul><li>www.dnsstuff.com </li></ul></ul><ul><ul><li>www.traceroute.org </li></ul></ul><ul><ul><li>www.networktools.com </li></ul></ul><ul><ul><li>www.cotse.com/refs. htm </li></ul></ul><ul><ul><li>www.securityspace.com </li></ul></ul><ul><ul><li>www.dlsreports.com </li></ul></ul>
  54. 54. AttackPortal <ul><li>AttackPortal </li></ul><ul><ul><li>Helps attacker remain anonymous </li></ul></ul><ul><ul><li>This site is moribund (2005) </li></ul></ul>
  55. 55. Conclusion <ul><li>Attacker can gain useful info from variety of sources </li></ul><ul><ul><li>From social engineering to automated tools… </li></ul></ul><ul><ul><li>… and everything in between </li></ul></ul><ul><li>Useful info might include </li></ul><ul><ul><li>Contact info, IP addresses, domain names </li></ul></ul><ul><ul><li>Possibly system details, technologies used, … </li></ul></ul><ul><li>Building blocks for actual attacks </li></ul>
  56. 56. Summary <ul><li>Sophisticated attacks likely to start with recon phase </li></ul><ul><li>Low-tech recon techniques </li></ul><ul><ul><li>Social engineering </li></ul></ul><ul><ul><li>Spoofed caller ID </li></ul></ul><ul><ul><li>Physical access </li></ul></ul><ul><ul><li>Dumpster diving </li></ul></ul>
  57. 57. Summary <ul><li>Higher-tech techniques </li></ul><ul><ul><li>Google hacking, SiteDigger, GHDB </li></ul></ul><ul><ul><li>Whois databases, InterNIC, ARIN </li></ul></ul><ul><ul><li>DNS, nslookup, dig </li></ul></ul><ul><ul><li>Sam Spade, client-side recon tools </li></ul></ul><ul><ul><li>Web-based recon tools </li></ul></ul>