Hypertext Transfer Protocol
Source Code Review
Review source code and Page Contents With Burp Suite/Site Map. Add Target Scope under Target > Scope > Add
View Landing Page /
Add domain or hostname to Kali /etc/hosts file and review landing page /
General Scoping
Discover Potential Filename patterns for custom bruteforcing directories and files.
Discover usernames or email addresses with exiftool after downloading.
Discover HTTP Server Version.
Discover JavaScript Version.
Search For JavaScript Known Version Vulnerabilities.
Discover Web Application Name.
Discover Web Application Version.
Search For Web Application Known Version Vulnerabilities.
check certificate if applicable.
Discover Admin Login pages.
Test For default credentials.
Discover User Logins.
Discover User Registrations.
Screenshot Inspection
Aquatone

View Certificate Information
Browse to the https://$ip/ and view the certificate
Server Header Information
Fuzzing Sub-domains
Fuzzing VHOSTs
Fuzzing Directories Files Parameters
Be sure to test both http and https
Extensions
Directories
Files
Parameters
GET
POST
Values
values can be for example usernames, names, id's
Random
Response Headers
Search headers such as X-Powered-By. This may reveal vulnerable versioning
Command Injection
Local File inclusion
Linux
Windows
Remote File inclusion
SQL injection
Authentication Bypass
Manually confirm the results to then filter out unwanted responses by using --hh
XXE
XSS
Stored (Persistent) XSS
The most critical type of XSS, which occurs when user input is stored on the back-end database and then displayed upon retrieval (e.g., posts or comments)
Reflected (Non-Persistent) XSS
Occurs when user input is displayed on the page after being processed by the backend server, but without being stored (e.g., search result or error message)
DOM-based XSS
Another Non-Persistent XSS type that occurs when user input is directly shown in the browser and is completely processed on the client-side, without reaching the back-end server (e.g., through client-side HTTP parameters or anchor tags)
Testing XSS Payloads

window.origin in the alert box, instead of a static value like 1. In this case, the alert box would reveal the URL it is being executed on, and will confirm which form is the vulnerable one, in case an IFrame was being used.XSS Discovery Automation
XSStrike
Phishing
Login Form Injection



Session Hijacking





XSS Prevention
Input Validation

email input field and returning true or false whether it matches the Regex validation of an email format
Input Sanitization

\, which should help ensure that a user does not send any input with special characters (like JavaScript code), which should prevent vulnerabilities like DOM XSS.
addslashes function to sanitize user input by escaping special characters with a backslash. In any case, direct user input (e.g. $_GET['email']) should never be directly displayed on the page, as this can lead to XSS vulnerabilities
Output HTML Encoding

Output Encoding. This means that we have to encode any special characters into their HTML codes, which is helpful if we need to display the entire user input without introducing an XSS vulnerability. For a PHP back-end, we can use the htmlspecialchars or the htmlentities functions, which would encode certain special characters into their HTML codes (e.g. < into <), so the browser will display them correctly, but they will not cause any injection of any sort
html-entities, as follows:Direct Input
Never use user input directly within certain HTML tags, like:
JavaScript code
<script></script>CSS Style Code
<style></style>Tag/Attribute Fields
<div name='INPUT'></div>HTML Comments
<!-- -->
In addition, avoid using JavaScript functions that allow changing raw text of HTML fields, like:
DOM.innerHTMLDOM.outerHTMLdocument.write()document.writeln()document.domain
jQuery:
html()parseHTML()add()append()prepend()after()insertAfter()before()insertBefore()replaceAll()replaceWith()
Server Configuration
There are certain back-end web server configurations that may help in preventing XSS attacks, such as:
Using HTTPS across the entire domain.
Using XSS prevention headers.
Using the appropriate Content-Type for the page, like
X-Content-Type-Options=nosniff.Using
Content-Security-Policyoptions, likescript-src 'self', which only allows locally hosted scripts.Using the
HttpOnlyandSecurecookie flags to prevent JavaScript from reading cookies and only transport them over HTTPS.
Nikto Vulnerability Scanner
Last updated