Question: Ask an expert ASSIGNMENT 6 3 0 points Code Assignment: Web Application Security with Python Objective: This assignment focuses on analyzing web applications and developing
Ask an expert
ASSIGNMENT
points
Code Assignment: Web Application Security with Python
Objective: This assignment focuses on analyzing web applications and developing Python
scripts for web hacking tasks. You will be required to create a web path scanner and a simple
bruteforcing tool using the Python requests library. This assignment will help you practice
common techniques for enumerating web directories and bruteforcing login forms.
Tasks:
Part : Web Path Scanner
Web Path Discovery:
Create a Python script pathscanner.py that can scan a website for the
presence of specific files and directories.
Use a local directory structure such as WordPress to generate a list of paths and
use this list to check if the same paths exist on the target website.
The script should log successful paths where the server responds with status code
Requirements:
The script should use multithreading to speed up the scanning process.
Handle common file extensions like phpbak, and txt
Print the results to the console and save them in a file called foundpaths.txt
Part : BruteForce HTML Form Authentication
Login Brute Forcer:
Write a script bruteforceloginpy that bruteforces an HTML login form
using a dictionary of usernames and passwords.
Use the requests library to handle sessions and maintain cookies.
The script should:
Retrieve the login form and parse out the hidden form fields if any
Use a dictionary of usernames and passwords to attempt logins
Detect a successful login by checking the response content for a specific
success string eg "Welcome" or "Dashboard"
Requirements:
Parse out all necessary form fields automatically.
Use multithreading to speed up the bruteforcing process.
Print any successful logins to the console and save them in a file called
successfulloginstxt
What need to turnin:
Submit two Python scripts pathscanner.py and bruteforceloginpy with
comments explaining the code logic
Test each script and provide the outputs as a Word or PDF document. The scripts should
print outputs to the console and log results into a text file. Ensure to label your
screenshots clearly
Notes:
Run the scripts in a safe testing environment such as web server in Metasploitable
Ensure all dependencies like requests and xml are installed before running the scripts.
Adjust the TARGET, WORDLIST, and other constants as needed to match your testing
environment.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
