Greenwolf/social_mapper
GitHub: Greenwolf/social_mapper
基于面部识别技术的开源情报工具,用于跨社交媒体平台大规模自动关联目标人物资料,帮助红队在渗透测试中快速完成目标侦察
Stars: 4025 | Forks: 817
# Social Mapper


**此工具目前已不再积极维护,部分功能可能仍然可用,我将接受 Pull Request 以保持其更新**
**警告:FACEBOOK 现在会在几百次搜索后检测到该工具,请仅使用一次性 FACEBOOK 账号**
一款由 Jacob Wilkin ([Greenwolf](https://github.com/Greenwolf)) 开发的,通过面部识别关联社交媒体个人资料的社交媒体映射工具。
Social Mapper 是一款开源情报工具,它使用面部识别技术在跨平台上大规模关联社交媒体个人资料。它采用自动化方法,在热门社交媒体网站上搜索目标人物的姓名和照片,以准确检测和汇总个人的网络足迹,并将结果输出为可供人工操作员快速审查的报告。
Social Mapper 在安全行业中有多种用途,例如自动收集大量社交媒体个人资料,用于定向钓鱼攻击。面部识别通过排除搜索结果中的误报来辅助此过程,从而加快了人工操作员审查数据的速度。
Social Mapper 支持以下社交媒体平台:
* LinkedIn
* Facebook
* Pinterest
* Twitter
* Google Plus
* Instagram
* VKontakte
* Weibo
* Douban
Social Mapper 接受多种输入类型,例如:
* 组织名称,通过 LinkedIn 搜索
* 包含命名图像的文件夹
* 包含姓名和在线图像 URL 的 CSV 文件
## 使用场景(为什么要运行此工具)
Social Mapper 主要面向渗透测试人员和红队人员,他们将使用它来扩展目标列表并查找目标的社交媒体资料。接下来的操作仅受限于你的想象力,但这里有几个用于启发思路的想法:
(注意:Social Mapper 并不执行这些攻击,它只是收集大规模执行这些攻击所需的数据。)
* 创建虚假的社交媒体资料来“添加”目标为好友,并发送链接或恶意软件。最新统计数据显示,与通过电子邮件发送的链接和文档相比,社交媒体用户点击链接和打开文档的可能性要高出两倍多。
* 利用代金券和优惠诱骗用户透露其电子邮件地址和电话号码,从而转向网络钓鱼、语音钓鱼或短信钓鱼。
* 在确认目标拥有某个社交媒体网站的账号后,针对该网站创建自定义的钓鱼活动。通过在电子邮件中包含他们的个人资料图片来使这些活动显得更加逼真。获取密码以进行密码重用。
* 查看目标照片以寻找员工门禁卡徽章,并熟悉建筑内部环境。
## 入门指南
这些说明将向你介绍 Social Mapper 的要求及使用方法。
### 前置条件
注意:在 Kali 上,你现在可以从 setup 目录运行 ./kali-installer.sh。
由于这是一个基于 Python3 的工具,理论上它可以在 Linux、ChromeOS ([开发者模式](https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/generic)) 和 macOS 上运行。主要要求是 Firefox、Selenium 和 Geckodriver。要安装和设置该工具,请按照以下 4 个步骤操作:
1. 在此处安装适用于 macOS 的最新版 Mozilla Firefox:
```
https://www.mozilla.org/en-GB/firefox/new/
```
或者在 Debian/Kali 上(Ubuntu 不需要)使用以下命令获取非 ESR 版本的 Firefox:
```
sudo add-apt-repository ppa:mozillateam/firefox-next && sudo apt update && sudo apt upgrade
```
确保新版本的 Firefox 在环境变量路径中。如果不在,请手动添加。
2. 为你的操作系统安装 Geckodriver,并确保它在环境变量路径中。在 Mac 上你可以将其放在 `/usr/local/bin` 中,在 ChromeOS 上你可以将其放在 `/usr/local/bin` 中,在 Linux 上你可以将其放在 `/usr/bin` 中。
在此处下载最新版本的 Geckodriver:
```
https://github.com/mozilla/geckodriver/releases
```
3. 安装所需的库:
在 Linux 上安装以下前置依赖:
```
sudo apt-get install build-essential cmake
sudo apt-get install libgtk-3-dev
sudo apt-get install libboost-all-dev
```
在 Linux 和 macOS 上完成安装:
```
git clone https://github.com/Greenwolf/social_mapper
cd social_mapper/setup
python3 -m pip install --no-cache-dir -r requirements.txt
```
在 Mac 上,请查看 [setup/setup-mac.txt](setup/setup-mac.txt) 文件,了解一些额外的 xcode、brew 和 xquartz 安装说明。
4. 为 Social Mapper 提供登录社交媒体服务的凭据:
```
Open social_mapper.py and enter social media credentials into global variables at the top of the file
```
5. 对于 Facebook 和 Instagram,请确保在运行期间,你提供凭据的账号的语言设置为 'English (US)'。此外,请确保你所有的账号都能正常工作,并且可以在不需要双重身份验证的情况下登录。
6. 使用 Firefox 浏览器登录一次每个社交媒体个人资料,并保存/处理所有“未知浏览器”或“信任此浏览器”的页面。
## 使用 Social Mapper
Social Mapper 通过命令行运行,结合使用必选和可选参数。你可以指定输入类型和要检查的网站等选项,以及影响速度和准确性的许多其他参数。
### 必选参数
要启动该工具,必须提供 4 个参数:输入格式、输入文件或文件夹以及基本运行模式:
```
-f, --format : Specify if the -i, --input is a 'name', 'csv', 'imagefolder' or 'socialmapper' resume file
-i, --input : The company name, a CSV file, imagefolder or Social Mapper HTML file to feed into Social Mapper
-m, --mode : 'fast' or 'accurate' allows you to choose to skip potential targets after a first likely match is found, in some cases potentially speeding up the program x20
```
此外,必须通过包含以下一个或多个选项来选择至少一个要检查的社交媒体网站:
```
-a, --all : Selects all of the options below and checks every site that Social Mapper has credentials for
-fb, --facebook : Check Facebook
-tw, --twitter : Check Twitter
-ig, --instagram : Check Instagram
-li, --linkedin : Check LinkedIn
-gp, --googleplus : Check Google Plus
-vk, --vkontakte : Check VKontakte
-wb, --weibo : Check Weibo
-db, --douban : Check Douban
```
### 可选参数
还可以设置其他可选参数,以对 Social Mapper 的运行方式进行额外的自定义:
```
-t, --threshold : Customises the facial recognition threshold for matches, this can be seen as the match accuracy. Default is 'standard', but can be set to 'loose', 'standard', 'strict' or 'superstrict'. For example 'loose' will find more matches, but some may be incorrect. While 'strict' may find less matches but also contain less false positives in the final report.
-cid, --companyid : Additional parameter to add in a LinkedIn Company ID for if name searches are not picking the correct company.
-s, --showbrowser : Makes the Firefox browser visible so you can see the searches performed. Useful for debugging.
-w, --waitafterlogin : Wait for user to press Enter after login to give time to enter 2FA codes. Must use with -s
-v, --version : Display current version.
-vv, --verbose : Verbose Mode (Useful for Debugging)
-e, --email : Provide a fuzzy email format like "@domain.com" to generate additional CSV files for each site with firstname, lastname, fullname, email, profileURL, photoURL. These can be fed into phishing frameworks such as Gophish or Lucy.
```
### 示例运行
以下是一些针对不同用例的示例运行,以帮助你快速上手:
```
A quick run for Facebook and Twitter on some targets you have in an imagefolder, that you plan to manually review and don't mind some false positives:
python3 social_mapper.py -f imagefolder -i ./Input-Examples/imagefolder/ -m fast -fb -tw
The same as above but with the browser showing, and waiting enabled to allow a user to enter 2FA codes and manually rectify changed login processes:
python3 social_mapper.py -f imagefolder -i ./Input-Examples/imagefolder/ -m fast -fb -tw -s -w
An exhaustive run on a large company where false positives must be kept to a minimum:
python3 social_mapper.py -f company -i "Evil Corp LLC" -m accurate -a -t strict
A large run that needs to be split over multiple sessions due to time, the first run doing LinkedIn and Facebook, with the second resuming and filling in Twitter, Google Plus and Instagram:
python3 social_mapper.py -f company -i "Evil Corp LLC" -m accurate -li -fb
python3 social_mapper.py -f socialmapper -i ./Evil-Corp-LLC-social-mapper-linkedin-facebook.html -m accurate -tw -gp -ig
A quick run (~5min) without facial recognition to generate a CSV full of names, email addresses, profiles and photo links from up to 1000 people pulled out of a LinkedIn company, where the email format is known to be "firstname.lastname":
python3 social_mapper.py -f company -i "Evil Corp LLC" -m accurate -li -e ".@evilcorpllc.com"
```
### 故障排除
社交媒体网站经常更改其页面格式和类名。如果 Social Mapper 在特定网站上无法正常工作,请查看 [文档](docs/TroubleShooting_Social_Mapper) 部分,获取有关如何修复该问题的故障排除建议。欢迎提交包含修复内容的 Pull Request。
### Maltego
有关将 Social Mapper 结果加载到 Maltego 的指南,请查看 [文档](docs/Maltego_Import_Guide) 部分。
## 作者
* [**Jacob Wilkin**](https://github.com/Greenwolf) - *研究与开发*
## 致谢
* 感谢 Vincent Yiu 和 MDSEC 提供的优秀 LinkedInt 工具,该工具启发了我在输入方法中添加通过 LinkedIn 公司名称进行搜索的功能。
* 感谢 [janmei](https://github.com/janmei)(Pinterest 模块)、[alexsok-bit](https://github.com/alexsok-bit)、[ewpratten](https://github.com/ewpratten)、[cclauss](https://github.com/cclauss)、[TADT1909](https://github.com/tadt1909)、[Molkree](https://github.com/Molkree) 和 [kix-s](https://github.com/kix-s) 对本项目的贡献。
* 感谢 `[你的名字可能会出现在这里,来帮忙吧!]` 对项目的贡献。

## Youtube 宣传片:
[](https://www.youtube.com/watch?v=wVN-7R3B_xs&feature=youtu.be "Social Mapper Trailer")
标签:ESC4, ESC8, GitHub, Object Callbacks, OSINT, Python, Selenium, 人物搜索, 实时处理, 开源情报工具, 数据关联, 数据展示, 无后门, 目标画像, 社交媒体, 社会工程学, 红队, 网络安全, 网络钓鱼, 跨平台搜索, 身份溯源, 隐私保护, 面部识别, 黄金证书