项目作者: jonathan6661

项目描述 :
Fraud prevention tool
高级语言: Python
项目地址: git://github.com/jonathan6661/P1sty.git
创建时间: 2020-08-06T17:34:55Z
项目社区:https://github.com/jonathan6661/P1sty

开源协议:MIT License

下载


P1sty



P1sty is a python Tool that allows you to generate fully coded P1sty spiders
for any given paste website in less than a second.

P1sty’s spiders allows you to monitor a given paste website for occurrence of
your business name, domain, emails, credentials, Credit cards, etc.

Once the fraudulent information is detected, you will be notified in real time
by e-mail, and a MISP event will be automatically created.

In case of true positive alert, you should inform your Fraud departement also
you can notify your MISP community.

System architecture

architecture

Installation

  1. git clone https://github.com/jonathan6661/P1sty.git
  2. cd P1sty
  3. sudo pip install -r requirements.txt

Usage

  1. $ python p1sty.py -h
  2. Usage: p1sty.py [options]
  3. Options:
  4. -h, --help Show this help message and exit
  5. -n NAME, --name NAME Spider name
  6. -s START, --start START Archive url
  7. -m MISP, --misp MISP Misp events url
  8. -k KEY, --key KEY Misp key
  9. -lpx LPX Latest pastes XPath
  10. -rpx RPX Raw paste data XPath
  11. -ux UX Username XPath
  12. -d DOMAIN, --domain DOMAIN Company domain
  13. -b BIN, --bin BIN Company BIN
  14. -se SENDER, --sender SENDER Sender email address
  15. -p PASSWORD, --password PASSWORD Sender email password
  16. -r RECIPIENT, --recipient RECIPIENT Recipient email

Examples

Let’s suppose your domain is p1sty.com and your Bank BIN is 123456 and you want to monitor pastebin.com, pastebin.fr, gist.github.com, paste.debian.net,etc for occurance of your domain, urls, emails, credentials and your credit cards.
There is no need to develop for each website a specific crawler from scratch because with p1sty, you can generate a fully coded spider in less than a second based on specific parameters.

Example 1: monitoring pastebin.com (Without email notification)

  1. $ python p1sty.py -n "pastebin" -s "http://pastebin.com/archive" -m "https://Misp_URL/events" -k "MISP key" -lpx "//tr/td[1]/a/@href" -rpx "//textarea/text()" -ux "//div[@class='username']/a/text()" -d "p1sty.com" -b "123456"
  2. $ scrapy crawl pastebin

Example 2: monitoring pastebin.fr (With email notification)

  1. $ python p1sty.py -n "pastebin_fr" -s "http://pastebin.fr/" -m "https://Misp_URL/events" -k "MISP key" -lpx "//a[contains(@href,'http://pastebin.fr/')]/@href" -rpx "//textarea/text()" -ux "//div/h1/em/text()" -d "p1sty.com" -b "123456" -se "sender email" -p "password" -r "recipient email"
  2. $ scrapy crawl pastebin_fr

P1sty spiders to MISP

Besides extracting raw paste data, p1sty spiders extract usernames, Bitcoin addresses, email addresses, cards numbers and add it to MISP event as attributes and enable their correlation.
In this case, we will be able to correlate all of our findings to identify who is the criminal/malicious group behind data exposure.
We all know that most criminals uses single bitcoin address, so when a criminal adds parts of card or credential dumps and then mentions his Bitcoin address, we can identify all usernames used by him in different paste websites, this will allows us to perform tracking and we may be able to identify him ;)



Are we limited to that ?

Of course not, this project was developed for an article about Fraud prevention :)

The article is available on @jonathan.benalii/p1sty-for-fraud-prevention-18f8e122586?source=friends_link&sk=fac669a6ec9fa8b0c04372191e4d5e19">Medium

In the following articles, i will extend P1sty to monitor dark web also i will develop intelligente crawlers.

License

  1. Copyright (c) 2020 Abdelkader BEN ALI
  2. Permission is hereby granted, free of charge, to any person obtaining a copy
  3. of this software and associated documentation files (the "Software"), to deal
  4. in the Software without restriction, including without limitation the rights
  5. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  6. copies of the Software, and to permit persons to whom the Software is
  7. furnished to do so, subject to the following conditions:
  8. The above copyright notice and this permission notice shall be included in all
  9. copies or substantial portions of the Software.
  10. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  11. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  12. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  13. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  14. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  15. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  16. SOFTWARE.