This project is a small command-line phishing checker for an introductory security class.
The goal is to show how a URL can be checked using a few simple security ideas:
- A basic TLS certificate check
- Domain similarity against a trusted list
- A certificate-age heuristic
The program is meant to be a warning/demo tool, not a full browser replacement.
The main threat is phishing through lookalike domains.
An attacker can register a domain that looks very similar to a trusted site, such as:
google.comvsgoog1e.compaypal.comvspaypa1.com
A user may not notice the small spelling difference and may trust the fake site.
The attacker may also be able to obtain a valid TLS certificate for the fake domain, so TLS alone is not always enough to detect phishing.
The program tries to open a basic TLS connection to the domain on port 443.
If the site presents a certificate, this check passes.
The program compares the input domain against a small trusted list:
google.compaypal.comamazon.com
It uses edit distance to find the closest trusted domain.
Our project rule is:
- edit distance
0= pass - edit distance
1or2= suspicious and fail - edit distance greater than
2= pass, because it is not likely a typo-squatting attempt
The program reads the certificate notBefore field and estimates how old the certificate is.
For this project:
- if the certificate age cannot be determined, it is treated as risky
- if the certificate is less than 7 days old, it is treated as risky
- otherwise, it passes this mechanism
These are simple project-defined heuristics, not universal security rules.
Open PowerShell in the project folder and run:
python .\test.py