Soap XXE?

Iniciado por cacchuchin, Mayo 02, 2020, 05:09:30 AM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Mayo 02, 2020, 05:09:30 AM Ultima modificación: Mayo 02, 2020, 08:19:12 AM por Gabriela
Buenas tardes, estoy haciendo un CTF, tengo un endpoint que trabaja con SOAP estoy intentado hacer un XXE mi problema es que al enviar
<!ENTITY file SYSTEM "You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login/etc/passwd" > me devuelve un The markup in the document preceding the root element must be well-formed.

Alguna sugerencia o recomendacion?

Bueno yo creo que ya lo resolviste pero no dejaste la respuesta.

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

luego del protocolo tienes // cuando ya estas parado en el root de dicho file system por lo que claro es como tener un directorio sin nombre // o como si no huebieras definido un host:

file://host1:5432/data/expense/

The markup in the document preceding the root element must be well-formed.

Sin duda en el error te lo toma como mal directorio en el root.

Y la verdad creo que tu confusión viene por que manejas linux y windows y la diferencia rádica en que en linux cuando haces /etc/host estas yendo del root hacia allá -->
Y en windows nunca lo ves pero debes poner una barra para entrar a C osea /C
entonces tu tomas un ejemplo windows

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login          y hay 3 barras para entrar a C, como que C es un subdirectorio de un root donde se alojan los drives de windows.
Mientras que en linux segun tengo entendido estan en /media/
Entonces te vas a linux pones las ///  (3 barras) y luego escribes /etc/passwd.

Sin duda es un mistake por que usas ambos sistemas.
Para comprender mejor el tema y me incluyo, habría que estudiar bien como se comparta cada sistema operativo y file system y pueden haber casos particulares.

Saludos,


Mayo 09, 2020, 12:59:09 AM #2 Ultima modificación: Mayo 09, 2020, 01:13:52 AM por Solid Water
Oye, no tenìa un linux a mano para probar si estaba bien o mal definido tu root.
Pero más allá de eso hay un error en el XML.

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

En windows probé que me acepta una barra demás.

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login OK
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login/c:/ OK
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login//c:/ NOT OK

Saludos,