GithubHelp home page GithubHelp logo

yeyingtomorrow / phishingdetect Goto Github PK

View Code? Open in Web Editor NEW

This project forked from securycore/phishingdetect

0.0 1.0 0.0 11.13 MB

A phishing detect system with NLP/OCR/HTML features

Python 86.21% Shell 2.21% PHP 11.58%

phishingdetect's Introduction

Phishing Page Detect

A simple machine learning model to identify phishing pages by looking at:

  • HTML text
  • HTML structure
  • IMAGE text

Install OCR, NLTK and ML dependences

bash install.sh

Run the model

python predict_crawl.py -h
usage: predict_crawl.py [-h] [-t HTML] [-i IMG]

running analysis...

optional arguments:
  -h, --help            show this help message and exit
  -t HTML, --html HTML  A html source data to extract features
  -i IMG, --img IMG     A image data to extract features

Demo

Malicious sample:

python predict_crawl.py --img=test/sewauk.org.png --html=test/sewauk.org

> Use existing model
> Img is test/sewauk.org.png
> HTML is test/sewauk.org
> 1-malicious 0-benign
> Prediction is that [1.]

Benign sample:

python predict_crawl.py --img=test/100022538-facebook.com.png --html=test/100022538-facebook.source.txt

> Use existing model
> Img is test/100022538-facebook.com.png
> HTML is test/100022538-facebook.source.txt
> 1-malicious 0-benign
> Prediction is that [0.]

Model Evaluation

Train shape (1641, 526)
1-label: 643
KNN Accuracy: 0.81 (+/- 0.15)
DT Accuracy: 0.88 (+/- 0.13)
RF Accuracy: 0.92 (+/- 0.06)
SVM Accuracy: 0.85 (+/- 0.11)
Logit Accuracy: 0.88 (+/- 0.13)
Algorithm False positive False negative AUC
KNN 0.050435 0.125217 0.895357
DT 0.040000 0.073043 0.900039
RF 0.034783 0.038261 0.982916
SVM 0.034783 0.106087 0.936241
Logit 0.038261 0.067826 0.947001

FAQ

  • export python when import does not work
export PYTHONPATH="${PYTHONPATH}/usr/local/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages"
>>>>>>> 22449ef7a83f97d4f37d2561241e0d7fdbd6ddc9

Disclaimer

research prototype, use at your own risk.

phishingdetect's People

Contributors

ririhedou avatar

Watchers

James Cloos avatar

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.