lindsey98 / PhishIntention

PhishIntention: Phishing detection through webpage intention
MIT License
47 stars 13 forks source link

i used this code both in my local and google colab #29

Open Varun-Mayilvaganan opened 3 months ago

Varun-Mayilvaganan commented 3 months ago

Config '/content/PhishIntention/configs/faster_rcnn_web.yaml' has no VERSION. Assuming it to be compatible with latest v2. Traceback (most recent call last): File "/content/PhishIntention/phishintention.py", line 174, in phishintention_cls = PhishIntentionWrapper() File "/content/PhishIntention/phishintention.py", line 24, in init self._load_config() File "/content/PhishIntention/phishintention.py", line 28, in _load_config self.SIAMESE_THRE, self.LOGO_FEATS, self.LOGO_FILES, self.DOMAIN_MAP_PATH = load_config() File "/content/PhishIntention/configs.py", line 27, in load_config AWL_MODEL = config_rcnn(cfg_path=configs['AWL_MODEL']['CFG_PATH'], File "/content/PhishIntention/modules/awl_detector.py", line 35, in config_rcnn predictor = DefaultPredictor(cfg) File "/usr/local/lib/python3.10/dist-packages/detectron2/engine/defaults.py", line 288, in init checkpointer.load(cfg.MODEL.WEIGHTS) File "/usr/local/lib/python3.10/dist-packages/detectron2/checkpoint/detection_checkpoint.py", line 62, in load ret = super().load(path, *args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/fvcore/common/checkpoint.py", line 153, in load assert os.path.isfile(path), "Checkpoint {} not found!".format(path) AssertionError: Checkpoint /content/PhishIntention/models/layout_detector.pth not found! getting an error in this while running => !python phishintention.py --folder datasets/test_sites --output_txt test.txt Screenshot (220)

lindsey98 commented 3 months ago

please refer to https://github.com/lindsey98/PhishIntention/blob/main/setup.sh#L73 to Line 121 to download all the pre-trained models

Varun-Mayilvaganan commented 3 months ago

Hi lindsey, I solved the above error but even for malicious websites it shows me benign ; why is that?

Screenshot (17)

Thanks in advance!

lindsey98 commented 3 months ago

Hi, I suspect the reference list is not properly loaded, please check whether models/expand_targetlist has been unzipped and there are 277 folders inside.

Varun-Mayilvaganan commented 3 months ago

Hi, I tried it but the same issue arising! Screenshot (18)

lindsey98 commented 3 months ago
  1. make sure the directory looks like this:

    |_ models/
    |__ expand_targetlist/
      |____ Amazon/
      |____....
  2. Go to https://github.com/lindsey98/PhishIntention/blob/main/phishintention.py#L28 and set load_config(reload_targetlist=True)

Varun-Mayilvaganan commented 3 months ago

We need to change in the line you mentioned or at configs.py - L14?

lindsey98 commented 3 months ago

change this line only

Varun-Mayilvaganan commented 3 months ago

Screenshot (21) loaded all reference files and then this error pops up

lindsey98 commented 3 months ago

Not very sure about this error, you can try the following:

Step 1: Download the chromedriver executable file manually https://sites.google.com/chromium.org/driver/downloads. Make sure it matches your chrome version Step 2: Point the webdriver to this chromedriver path, replace this line https://github.com/lindsey98/PhishIntention/blob/main/utils/web_utils.py#L153 with driver = webdriver.Chrome(chrome_options=options, executable_path='path to the chromedriver executable')

Varun-Mayilvaganan commented 3 months ago

Thanks for your time! The project is working fine with no issues but i need to ask for the new testing sites, why it is predicting benign?

lindsey98 commented 3 months ago

It's likely because the [accounts.g.cdcde.com] is dead so the CRP intention cannot be confirmed. You can try on some fresh phishing feeds https://openphish.com/

Varun-Mayilvaganan commented 1 month ago

Hi lindsey, I worked on phishintention but the result is not that much accurate due to new evolving phishing websites. so give me an idea how i can improve it. note : i gave new websites not in target list

lindsey98 commented 1 month ago

Hi Varun, one way is to expand the target list to support new brands. For example, if you would like to support a new brand called DBS: