July 30, 2010, 11:57:05 pm
Maltego Forum

Username
Password

Pages: [1]
Print
Author Topic: Updated Facebook Transforms (Jan 2010)  (Read 10638 times)
singe
Newbie
*
Posts: 3


« on: January 16, 2010, 06:18:53 am »

Since Paterva can't release FB transforms due to legal silliness, here are the ones I made. Please read the disclaimer. They have been updated to work with FB's current code as of Jan 2010, and I did some stuff like deobfuscating the JavaScript they use to allow BeautifulSoup to do it's job nicely, so they have and should continue to be easy to update.

They currently don't support cookies and could do with that being added if anyone feel up to it, I tried to comment lots to make it easy.

Either way it's attached, what follows is the readme.txt file:
 ------------------------------------
| Matego - Facebook Transforms |
 ------------------------------------

Disclaimer (NB):
----------------

This code is for research and demonstration purposes only. It should not be used as it will violate Facebook's Terms of Service and could result in your account being shut down. The author accepts no liability or responsibility for the code or it's uses. The author also waives all intellectual property rights to the code. The code was authored by the individual author only, and neither his employer nor Paterva were involved in it's creation or release. The code is released in the public interest to help other's understand the implications of their privacy settings on Facebook, however, the author reserves the right to additional defences.

Pre-requisites:
---------------

* A licensed copy of Maltego, check http://www.paterva.com/maltego/
* Python (2.6 recommended)
* The following python libraries
    - pymaltego-singe This should be distributed along with this code.
    - mechanize
    - BeautifulSoup
    - urllib2
    These are all easily available and support the easy install method i.e. run the following in the extracted directory for each dependency "sudo python setup.py install"
    Note: for installing pymaltego-singe, make sure you are in the trunk/ directory or you will get a 'pymaltego' not found error.
* A facebook account - bear in mind as this is a violation of FB's ToS your account could get suspended. Additionally, having two FB accounts is a violation of the ToS.
* Suggested prerequisites:
    - an anonymising proxy e.g. Tor (scraping may not work correctly in foreign characters)
    - an anonymous FB test account

Installing:
-----------

1) Place the transforms somewhere on your filesystems.

You will need to create at least four local transforms:
* Phrase -> FacebookAffiliation (from_phrase_to_facebook.py)
* E-Mail -> FacebookAffiliation (from_phrase_to_facebook.py) (uncomment the limit = 10 line at the top before use)
* FacebookAffiliation -> (Friends of) FacebookAffiliations (from_fb_to_friends.py)
* FacebookAffiliation -> Person (from_fb_to_person.py)

For each transform:
2) In Maltego click Tools -> Manage Transforms
3) Click 'New Local Transform'
4) Complete the details on the first page e.g.
    Display Name : To Facebook
    Description : Search for an e-mail address on Facebook and return found Facebook accounts
    Author : singe
    Input Entity Type : EmailAddress
5) Click Next and complete the details on the next page e.g.
    Command : /usr/local/bin/python
    Parameters (optional) : <path to the local transform e.g. /home/foo/bin/maltego/facebook/from_phrase_to_facebook.py>
6) Click Finish

Usage
-----

Quite simple: add an appropriate entity, run the transform.

* maltego-facebook-v1.tgz (25.67 KB - downloaded 878 times.)
« Last Edit: January 20, 2010, 12:00:29 pm by singe » Logged
AndrewMohawk
Administrator
Full Member
*****
Posts: 105


« Reply #1 on: January 20, 2010, 10:40:07 am »

Hi Guys,

Just a quick headsup.

  • This will run on both the commercial and the community edition
  • to install the pymaltego-singe you need to run 'python setup.py install' from the trunk directory, not the one above

I also seem to be having the following error:

andrew@PickledOrange:~/fb/maltego-facebook/maltego-facebook$ ./from_phrase_to_facebook.py "Andrew"
D: Got login page
D: Logged In
D: First search completed
<MaltegoMessage><MaltegoTransformExceptionMessage><Exceptions><Exception>global name 'limit' is not defined</Exception></Exceptions></MaltegoTransformExceptionMessage></MaltegoMessage>

Look forward to the fix!

-AM
Logged
AndrewMohawk
Administrator
Full Member
*****
Posts: 105


« Reply #2 on: January 20, 2010, 10:42:35 am »

Sorry guys, that was a stupid mistake, within the from_phrase_to_facebook.py simply change this line:

#limit = 10

to

limit = 10

-AM
Logged
singe
Newbie
*
Posts: 3


« Reply #3 on: January 20, 2010, 12:02:47 pm »

Sorry, my bad on the install instructions for pymaltego-singe, have updated the README above to mention it.

Also my bad on commenting out the limit, however, note that leaving it as "limit = 10" will only return 10 results when searching for facebook accounts. You may want more, in which case increasing this number is a good idea.

If we find any more obvious dork moves I'll release a new version, but waiting for them to cumulate a bit.
Logged
AndrewMohawk
Administrator
Full Member
*****
Posts: 105


« Reply #4 on: January 25, 2010, 01:59:38 pm »

Please note the facebook login URL has changed to https://login.facebook.com/login.php

Change line 30 from:

response = mech.open("https://www.facebook.com/login.php")

To

response = mech.open(https://login.facebook.com/login.php ")
Logged
bulgin
Newbie
*
Posts: 4


« Reply #5 on: July 06, 2010, 03:33:38 pm »

I seem to have made a mistake in creating this transform in the commercial version of Maltego, and now I cannot delete it from the Manage transforms tab.

I am asked if I want to delete, I say yes, but it remains.

Is there something I'm missing here?
Logged
Pages: [1]
Print
Jump to: