Basic - OSINT - M04 - Gathering data from Facebook

This post is a part of the OSINT series.

1. Why would you want to use Facebook in OSINT?

I think that Facebook does not need any introduction. In simplest words, Facebook is the most popular social network / platform on the world at this moment. You can probobly see Facebook logo everywhere, on every website, on most products etc. This portal is getting bigger every day so only naive researcher will not take it seriously these days during data gathering and investgations.

Here are some Facebook big numbers from official Facebook Reports:

2. How to use Facebook in OSINT?

2.1 Download all feed from selected funpage.

How to run this code:

python funpage_feed.py -f FANPAGE_NAME -l 25

Parameters:

-f - Fanpage name

-l - Number of gathered elements each API call

Output:

FANPAGE_NAME_feed_data.csv

File Header:

"item_id","item_message","item_link_name","item_type","status_link","created_time","num_likes","num_comments","num_shares"

Comment:

This script could be very valuable in many situations. We want to know what posts were the most popular. We can also scrape feed from few similar fanpage and compare them.

2.2 Find out what fanpages are liked by another fanpage.

How to run this code:

python funpage_likes.py -f FANPAGE_NAME -l 1

Parameters:

-f - Fanpage name

-l - Number of gathered likes each API call

Output:

FANPAGE_NAME_likes.csv

File Header:

"fan_id","fan_category","fan_name"

Comment:

This script will allow us easily find out what fanpages are liked by particular fanpage and going further this way find out the relations between fanpages.

2.3 Search Facebook for specific phrase.

How to run this code:

python search_fb.py -q dev -t page -l 5

Parameters:

-q - Query to search

-t - Type of the results, default "page"

-l - Number of returned results

Output:

Output printed in console

3. Next steps

The aim of this article was to show and present the possibilities of using Facebook as a source of data, I described why Facebook can be so important in OSINT and how to gathenring data from it.

Please remember that this is just an introduction and covers only data gathering, you should realize that this is just a first step into OSINT world, in next we should know how to analyze collected data and how to get information from such data. These steps I would like to describe in Advanced OSINT series, so please leave the comment below if you are interested in such series of articles.

4. Additional information

The source code attached to this article is available on GitHub.

To start working with Facebook API you will need register your app and gain a developer key, you can do this at Facebook Developer Page. In above examples we used a Facebook Python SDK.

Posted with : OSINT

If you liked this post, you can share it with your followers or follow me on Twitter!