Coder Social home page Coder Social logo

jonathan6661 / p1sty Goto Github PK

View Code? Open in Web Editor NEW
26.0 3.0 13.0 34 KB

Fraud prevention tool

Home Page: https://github.com/jonathan6661/P1sty

License: MIT License

Python 100.00%
misp darkweb pastebin fraud-prevention leak-detection threat-intelligence automation cybersecurity information-security

p1sty's Introduction

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

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

Usage

$ python p1sty.py -h
Usage: p1sty.py [options]

Options:
  -h, --help                            Show this help message and exit
  -n NAME, --name NAME                  Spider name
  -s START, --start START               Archive url
  -m MISP, --misp MISP                  Misp events url
  -k KEY, --key KEY                     Misp key
  -lpx LPX                              Latest pastes XPath
  -rpx RPX                              Raw paste data XPath
  -ux UX                                Username XPath
  -d DOMAIN, --domain DOMAIN            Company domain
  -b BIN, --bin BIN                     Company BIN
  -se SENDER, --sender SENDER           Sender email address
  -p PASSWORD, --password PASSWORD      Sender email password
  -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)

$ 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"

$ scrapy crawl pastebin 

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

$ 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"

$ 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 Medium

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

License


    Copyright (c) 2020 Abdelkader BEN ALI

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.