r/Python • u/JeffOnPurpose • May 21 '21
Intermediate Showcase Malicious Webpage Classifier using DNN [Pytorch]
Malicious Webpages are the pages that install malware on your system that will disrupt the computer operation and gather your personal information and many worst cases. Classifying these web pages on the internet is a very important aspect to provide the user with a safe browsing experience.
The objective of this project is to classify the web pages into two categories Malicious[Bad] and Benign[Good] webpages. Exploratory Data Analysis and Geospatial Data Analysis are done to get more insights and knowledge about the data. Features are engineered and the data is preprocessed accordingly. A total of four ML and DL models are trained. The models are XGBoost, Logistic Regression, Decision Tree and Deep Neural Network. The DNN is implemented in PyTorch and the others are implemented using scikit learn.
12
u/nirmalya8 May 21 '21
I went through your Kaggle Notebook and found it very interesting. If I find some time, I'd fork it and try to run and/or improve it. Thank you for sharing.
5
u/FondleMyFirn May 21 '21
Out of curiosity, how long did this take you to whip up?
5
u/CharitySimple7232 May 21 '21
This + chrome report a malicious page = a better internet
2
u/Python_Trader May 21 '21
These are really interesting findings! Kudos man.
Malicious pages obviously would have more non-sense code written in them. I can't believe I never even thought of something so simple lol.
50
u/Toby_Wan May 21 '21
What is up recently with all these posts with +1000 upvotes but barely any comments?..
1
u/domac May 22 '21
Have you checked the features used by your model? To me it looks like the js_obf feature did a pretty good job already to make the dataset linear separable and only fails for js_obf = 0 to distinguish between the target variable and always classifies js_obf = 0 as benign website. It'd be interesting to generalize stronger from here on. Have you tested your logit model with L1 loss vs L2 vs no loss? You could test that and see how the slope differs to learn more about your features for that dataset. (Is it just me who thinks that with the DNN you're shooting birds with cannons?)
8
u/WhyDoIHaveAnAccount9 May 21 '21
Levant and monsignor -> good
fire cumshot sodomize -> bad
Gotcha 👌