SCRIPTING
SCRIPTING
import socket # For handling network connections and checking open ports
from concurrent.futures import ThreadPoolExecutor # For scanning multiple ports concurrently
# Set a timeout of 1 second for the connection attempt to avoid long delays
sock.settimeout(1)
# Main function to handle user input and initiate the scanning process
def main():
# Ask the user to input the target IP address
ip = input("Enter target IP address: ")
# Ensure the script runs only when executed directly (not when imported)
if __name__ == "__main__":
main() # Start the main function
To begin, open Docker on your machine to host the temporary web server for OWASP Juice
Shop. This will enable you to run the Juice Shop application in a contained environment,
ensuring that all dependencies are handled automatically.
Launch the OWASP Juice Shop container from Docker Platform after which you can move
forward with configuring Burp Suite and the Chromium browser for vulnerability assessment.
Open Burp Suite. Burp Suite functions as both a proxy tool and a web vulnerability scanner
which enables users to employ it for intercepting and altering web application traffic from their
browser to OWASP Juice Shop.
Launch the Chromium browser, this is the best browser to use because of easy integration with
Burp Suite.
Next step is to go 127.0.0.1:3001 which directs the Chromium browser to OWASP Juice Shop.
To begin targeting usernames and passwords in the OWASP Juice Shop application, the next step
is to create a new user account. This will allow you to test various vulnerabilities, such as weak
authentication, password policies, and user enumeration.
With your account created, you can now begin testing the system's handling of usernames and
passwords. This includes:
Fuzzing: Use Burp Suit tools to perform brute force or fuzzing attacks on the login page
targeting weak credentials
After logging in, the next step is to capture the login request using the Intercept feature. This
allows you to analyze the request to make sure the correct credentials were captured.
We will do this by ensuring the request contains the username and password that was entered.
After capturing the POST request, the next step is sending the request to the intruder tool.
The payload markers (§) are added around the email and password because it will tell the
payloads added in the payload column which details to attack.
Attack has been run.
Intercept is turned off and payloads will be used as login and password to test if the attack was
successful.
Success message indicates that the sql attack was successful.