tag:blogger.com,1999:blog-22886333023605591892024-03-16T11:00:34.396-07:00 GuatewaresSEGURIDAD INFORMATICA, PENTESTING, HACKING, SQL INJECTION, CURSO HACKING, HACKING CON BUSCADORES, HACKER GUATEMALA,SPOOFING, HARDENING,HACKING GUATEMALAUnknownnoreply@blogger.comBlogger452125tag:blogger.com,1999:blog-2288633302360559189.post-62484706833900091262023-01-01T01:00:00.001-08:002023-01-01T07:29:17.219-08:00Bienvenido 2023<p>Iniciamos un año mas, en el cual se vienen muchos retos, personales y laborales que deberemos de afrontar, y deseo que en cada uno de estos retos, cada uno tenga las fuerzas suficientes para superarlas de la mejor forma.</p><p>Espero que el año 2022, les haya dejado las mejores experiencias y que cada propósito, fuera cumplido.</p><p>Este año, espero retomar el blog, con mas frecuencia, y el proyecto de la herramienta de Odoo. Sin mas que agregar por el momento, les deseo, lo mejor para este año.</p><div class="separator" style="clear: both;">Saludos.</div><p>Lexer Pars. </p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-34794854648362561112022-01-28T03:33:00.002-08:002023-01-01T07:26:22.950-08:00Odoo hacking IX<p style="text-align: justify;"> En la anterior entrada, visualizamos como obtener información sobre a que módulos tenemos acceso mediante un usuario de portal, claro que esto también puede aplicar a un usuario interno en Odoo. Sin embargo el acceso al modelo ir.model no siempre estará disponible en todas las instancias de Odoo y no por eso debemos confiar que nuestra instancia esta segura, pues por medio de un ataque de fuerza bruta es posible validar a que modelos tiene acceso un usuario de portal y que clase de acceso posee.</p><p style="text-align: justify;">Es importante listar estos modelos corregir accesos en los que corresponda, aunque eso podremos verlo mas adelante, en esta entrada, estaremos limitados a obtener esta información que nos podrá ser útil adelante para atacar la instancia de Odoo. </p><p style="text-align: justify;">Para lograr listar los modelos, emplearemos un ataque de fuerza bruta, mediante un diccionario de modelos estándar de Odoo, en el cual se pueden incorporar mas modelos, por ejemplo, si se posee el listado de aplicaciones instalas y hay aplicaciones de terceros instalas con código fuente disponible, se pueden agregar al listado por defecto.</p><p style="text-align: justify;"><br /></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="337" src="https://www.youtube.com/embed/SmvCxxnlHYg" width="406" youtube-src-id="SmvCxxnlHYg"></iframe></div><div class="separator" style="clear: both; text-align: center;">Vídeo : Ataque de fuerza bruta a modelos y accesos.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Saludos.</div><div class="separator" style="clear: both; text-align: left;">Lexer Pars.</div><br /><div><div class="separator" style="clear: both; text-align: center;"><a href="https://github.com/lexerpars/odoo_hacking" target="_blank">Script Odoo Hacking</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-i.html" target="_blank">Odoo Hacking I</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ii.html" target="_blank">Odoo Hacking II</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iii.html" target="_blank">Odoo Hacking III</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iv.html" target="_blank">Odoo Hacking IV</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-v.html" target="_blank">Odoo Hacking V</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vi.html" target="_blank">Odoo Hacking VI</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vii.html" target="_blank">Odoo Hacking VII</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-viii.html" target="_blank">Odoo Hacking VIII</a></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ix.html" target="_blank">Odoo Hacking IX</a></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-53557570866324071122022-01-27T18:44:00.014-08:002022-01-28T03:35:51.928-08:00Odoo hacking VIII<p style="text-align: justify;">El día de hoy seguiremos ampliando la funcionalidad para nuestro script, esta vez agregaremos un método que nos permita validar si tenemos acceso de lectura y escritura, para ello utilizaremos el método check_access_rights, el cual nos devolverá un True si el usuario tiene acceso a un determinado modulo o False si no lo tiene.</p><p style="text-align: justify;">Si tenemos acceso al modulo ir.model, podremos listar los accesos sobre cada uno de los módulos disponibles, si fuera el caso que no tenemos acceso a este modelo, en la siguiente entrada, incluiremos una funcionalidad que permita consultar los modelos estándar que de Odoo, que mal implementados en una instancia, nos podrían dar acceso a información útil.</p><p style="text-align: justify;">Con esta funcionalidad, fácilmente se puede validar que modelos tenemos inseguros en cuando a lectura y escritura, esto claro esta, para usuarios de tipo portal. Mas adelante, agregaremos una funcionalidad, para construir un reporte de la auditoria realizada a la instancia.</p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="322" src="https://www.youtube.com/embed/JmtdpavWf44" width="387" youtube-src-id="JmtdpavWf44"></iframe></div><div class="separator" style="clear: both; text-align: center;">Video: Funcionalidad para validar accesos.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Saludos.</div><div class="separator" style="clear: both; text-align: left;">Lexer Pars.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://github.com/lexerpars/odoo_hacking" target="_blank">Script Odoo Hacking</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-i.html" target="_blank">Odoo Hacking I</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ii.html" target="_blank">Odoo Hacking II</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iii.html" target="_blank">Odoo Hacking III</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iv.html" target="_blank">Odoo Hacking IV</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-v.html" target="_blank">Odoo Hacking V</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vi.html" target="_blank">Odoo Hacking VI</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vii.html" target="_blank">Odoo Hacking VII</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-viii.html" target="_blank">Odoo Hacking VIII</a></div></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ix.html" target="_blank">Odoo Hacking IX</a></div></div><p style="text-align: justify;"><br /></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-16964073038626848982022-01-19T16:45:00.006-08:002022-01-28T03:35:40.574-08:00Odoo hacking VII<p style="text-align: justify;"> Antes de empezar con el tema, me gustaría poder realizar las entradas del blog, con mas carga de información, para avanzar con los temas, pero en los últimos días, se me ha complicado mucho la vida, en cuanto a lo laboral, estudios y vida social, que se me ha llegado a limitar bastante el tiempo, sin embargo, espero poder hacer un espacio mas grande de tiempo con el cual, comparta mas de información.</p><p style="text-align: justify;">Y continuando con el tema, un modelo con mucha información que debemos tratar de minar, por decirlo así, en otras palabras, extraer toda la información posible, es mail.mail, no siempre, pero si en muchos casos, este modelo se encuentra desprotegido y es posible obtener muchos o mejor dicho, todos los correos enviados y recibidos en la instancia de Odoo. </p><p style="text-align: justify;">Lo anterior es bastante bueno, puesto que nos permite con facilidad y algo de suerte, obtener un listado interno de usuarios, esto nos daría la posibilidad de poder realizar un ataque de fuerza bruta a dichos usuarios, para intentar adivinar su clave de acceso.</p><p style="text-align: justify;">Es muy importante que al momento de estar desprotegido este modelo y permita obtener la información, realizar la extracción, registro por registro, ya que la cantidad de información recibida puede hacer que el sistema colapse y se realice una denegación de servicio. </p><p style="text-align: justify;">Les comparto un video donde se aprecia esta funcionalidad en el script que hemos venido trabajando.</p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/KpP3j2vED7s" width="320" youtube-src-id="KpP3j2vED7s"></iframe></div><div style="text-align: center;">Video : Funcionalidad para obtener correos y enumerar modelos</div><p style="text-align: justify;">Saludos.</p><p style="text-align: justify;">Lexer Pars.</p><p style="text-align: justify;"><br /></p><div class="separator" style="clear: both; text-align: center;"><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://github.com/lexerpars/odoo_hacking" target="_blank">Script Odoo Hacking</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-i.html" target="_blank">Odoo Hacking I</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ii.html" target="_blank">Odoo Hacking II</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iii.html" target="_blank">Odoo Hacking III</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iv.html" target="_blank">Odoo Hacking IV</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-v.html" target="_blank">Odoo Hacking V</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vi.html" target="_blank">Odoo Hacking VI</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vii.html" target="_blank">Odoo Hacking VII</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-viii.html" target="_blank">Odoo Hacking VIII</a></div></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ix.html" target="_blank">Odoo Hacking IX</a></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-29815628861912011572022-01-18T20:15:00.005-08:002022-01-28T03:35:29.854-08:00Odoo hacking VI<p style="text-align: justify;"> Continuando con la herramienta, una vez ya enumeramos la información básica, empezaremos a utilizarla, iniciaremos obteniendo el listado de modelos disponibles en la instancia de Odoo, para ello podremos emplear un usuario interno o bien un usuario de portal. Para lograr esto debemos realizar una petición por medio de xmlrpc, empleando el método search_read.</p><p style="text-align: justify;"><br /></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNk7MR9uLvXViMv6ap_vuNt3FTXGGtN6VkPJb3f5yZPoA3JRQ8r-gIllchoVGDHEqIJW5mG9Jwu7q945YCtDXnsmvAhWmVrA0-_2z3AhT0L6-maleVN3eq0GtGhmZhyphenhyphensEel0GG0zJehH4/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="645" data-original-width="1051" height="392" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNk7MR9uLvXViMv6ap_vuNt3FTXGGtN6VkPJb3f5yZPoA3JRQ8r-gIllchoVGDHEqIJW5mG9Jwu7q945YCtDXnsmvAhWmVrA0-_2z3AhT0L6-maleVN3eq0GtGhmZhyphenhyphensEel0GG0zJehH4/w640-h392/image.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;">Imagen 1: Código para obtener listado de módulos en Odoo.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: justify;">Lo anterior es importante puesto que con ello obtendremos el listado completo de modelos disponibles en la instancia, con esto, podremos verificar en cada modelo, posibles métodos y funciones inseguras que permitan comprometer la instancia, esto empleando ataques de fuerza bruta para adivinar nombres de métodos y funciones, así como buscar código fuente de aplicaciones en internet.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQr69L9dHyHYl9hEsQ_eGP2aKIoS7OQOHATLy1SN-4BBzWEKoANGLWUHzIdPWt_Fqv32ZLJ8LJV8UWu9GF0JTwgHrDySUW8cfuFwzuZ1FdP_5gaypYCeom2h3Xcugec9-0t-3MB9oaKus/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="981" data-original-width="1196" height="524" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQr69L9dHyHYl9hEsQ_eGP2aKIoS7OQOHATLy1SN-4BBzWEKoANGLWUHzIdPWt_Fqv32ZLJ8LJV8UWu9GF0JTwgHrDySUW8cfuFwzuZ1FdP_5gaypYCeom2h3Xcugec9-0t-3MB9oaKus/w640-h524/image.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;">Imagen 2: Resultado de búsqueda de modelos.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: justify;">En la imagen 2 obtenemos el listado de modelos, empleando un usuario de portal, con lo cual, ya tendremos un listado de información suficientemente grande para auditar, además, de validar a cuanta información tenemos acceso en cada modulo, que ya iremos obteniendo mas adelante.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div style="text-align: left;">Saludos.</div><div style="text-align: left;">Lexer Pars.</div><br /></div><br /><div class="separator" style="clear: both;"><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://github.com/lexerpars/odoo_hacking" target="_blank">Script Odoo Hacking</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-i.html" target="_blank">Odoo Hacking I</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ii.html" target="_blank">Odoo Hacking II</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iii.html" target="_blank">Odoo Hacking III</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iv.html" target="_blank">Odoo Hacking IV</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-v.html" target="_blank">Odoo Hacking V</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vi.html" target="_blank">Odoo Hacking VI</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vii.html" target="_blank">Odoo Hacking VII</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-viii.html" target="_blank">Odoo Hacking VIII</a></div></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ix.html" target="_blank">Odoo Hacking IX</a></div></div></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><br /><p></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-40148018653034185432022-01-17T11:41:00.006-08:002022-01-17T11:44:36.197-08:00Odoo Security | Blindando el Sistema desde el Desarrollo<p style="text-align: justify;"> Hace ya varios días hemos abordado temas sobre <a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-i.html" target="_blank">malas practicas al momento de implementar Odoo</a>, así como <a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por.html" target="_blank">malas practicas al momento de desarrollar en Odoo</a>, que pueden dar paso a que un atacante acceda a nuestra instancia de Odoo e incluso acceder al servidor que lo aloja.</p><p style="text-align: justify;">Hoy encontré un video muy bueno de <a href="https://ateneolab.com/" target="_blank">ateneolab</a>, donde abordan temas sobre buenas practicas orientadas a la seguridad en el desarrollo de aplicaciones en Odoo, aunque de momento aun no hemos abordado temas sobre seguridad en instancia de Odoo, si que quiero compartir este video, con buenas practicas.</p><p style="text-align: justify;">Con la <a href="https://www.guatewares.com/2022/01/odoo-hacking-i.html" target="_blank">herramienta para auditar Odoo</a> que estamos trabajando, podremos detectar inseguridades que pueden dejarnos vulnerables, con lo cual, podremos aplicar las medidas compartidas en el video, para asegurar nuestros métodos públicos.</p><p style="text-align: justify;">Mas adelante estaremos abordando estos temas de seguridad, tanto a nivel de instancia de Odoo, programación segura, y hardening a servidores. </p><p style="text-align: justify;"><br /></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="362" src="https://www.youtube.com/embed/_ShSZPsxF-s" width="435" youtube-src-id="_ShSZPsxF-s"></iframe></div><div class="separator" style="clear: both; text-align: center;">Video : Blindando el Sistema desde el Desarrollo</div>Saludos.<div>Lexer Pars.<br /><p style="text-align: justify;"><br /></p></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-49761028616183068792022-01-16T08:30:00.047-08:002022-01-28T03:35:09.930-08:00Odoo hacking V<p style="text-align: justify;"> Después de haber incorporado las funciones para listar la versión, el tipo de instancia, la versión del protocolo, listar las base de datos, listar las aplicaciones instaladas en una instancia, opción para registro de usuarios de portal, así como restablecimiento de contraseñas.</p><p style="text-align: justify;">Lo próximo será, realizar una comprobación rápida, de usuarios y claves que pueden emplearse por defecto, aunque parezca mentira, hay muchas instancias que contienen credenciales comunes y fáciles de adivinar, por ello, realizaremos un breve ataque de fuerza bruta, a todas las bases de datos que se dispongan, en caso de poder listar las base e datos, activaremos este ataque de fuerza bruta.</p><p style="text-align: justify;"><br /></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="394" src="https://www.youtube.com/embed/WwVDpGoLf1U" width="537" youtube-src-id="WwVDpGoLf1U"></iframe></div><div class="separator" style="clear: both; text-align: center;">Video 1: Funcionamiento de odoo script y fuerza bruta.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: justify;">En el video anterior, podrás visualizar el script en funcionamiento, donde se realizar la obtención de información básica de la instancia, así como obtener todas las base de datos, y por ultimo un ataque de fuerza bruta a cada una de las base de datos, con credenciales básicas. Todo lo anterior de una primera fase de una auditoria, con una comprobación básica de información.</div><div class="separator" style="clear: both; text-align: justify;"><br /></div><div class="separator" style="clear: both; text-align: justify;">Mas adelante, incorporaremos un ataque de fuerza bruta, basado en un diccionario externo, tanto para usuarios y claves, así como para nombres de funciones y parámetros de módulos instalados en una instancia.</div><br /><p></p><p style="text-align: justify;">Saludos.</p><p style="text-align: justify;">Lexer Pars.</p><p style="text-align: justify;"><br /></p><div class="separator" style="clear: both; text-align: center;"><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://github.com/lexerpars/odoo_hacking" target="_blank">Script Odoo Hacking</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-i.html" target="_blank">Odoo Hacking I</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ii.html" target="_blank">Odoo Hacking II</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iii.html" target="_blank">Odoo Hacking III</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iv.html" target="_blank">Odoo Hacking IV</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-v.html" target="_blank">Odoo Hacking V</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vi.html" target="_blank">Odoo Hacking VI</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vii.html" target="_blank">Odoo Hacking VII</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-viii.html" target="_blank">Odoo Hacking VIII</a></div></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ix.html" target="_blank">Odoo Hacking IX</a></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-30627369050522421182022-01-15T08:00:00.003-08:002022-01-28T03:34:52.320-08:00Odoo hacking IV<p style="text-align: justify;"> Continuando con nuestro script, ahora, agregamos una función que nos permita recuperar las aplicaciones instaladas en la instancia de Odoo, esto aun sin autenticarnos en el sistema. Cabe mencionar que no todas las instancias poseen esta información, como carácter publico.</p><p style="text-align: justify;">Para ello, accederemos al recurso website/info, esta pagina es muy importante al momento de auditar una instancia de Odoo, puesto que ofrece un listado de aplicaciones instaladas, con nombre y url del autor, esto ofrece un repertorio de código que puede analizarse para determinar si existen aplicaciones inseguras, desde luego, siempre y cuando estas aplicaciones estén disponibles para descargar en internet.</p><p style="text-align: justify;">El recurso anterior esta disponible, siempre y cuando exista una sola base de datos en el servidor, o bien, exista un filtrado de base de datos y el administrador tenga publico este recurso, o no permita listar las bases de datos, en caso contrario, no podrá ser accedido.</p><p style="text-align: justify;">Para lograr esto, utilizaremos una función, que nos retorne esta información, apoyándonos de técnicas como <a href="https://es.wikipedia.org/wiki/Web_scraping" target="_blank">web scraping</a>.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivJSY1-tb_z61yeApxiWO7SJ5ZxITH8fk3zG_ZT19VboATiiToCXmtkJtYQ39HWGh_SGmZUH7YgIYv6p0Z-fAtcl_f4QvN40ee7APFxb8nVU3tzdOC3hyIMBkFIXYY9rmgFJeB4IPciOY/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="288" data-original-width="1187" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivJSY1-tb_z61yeApxiWO7SJ5ZxITH8fk3zG_ZT19VboATiiToCXmtkJtYQ39HWGh_SGmZUH7YgIYv6p0Z-fAtcl_f4QvN40ee7APFxb8nVU3tzdOC3hyIMBkFIXYY9rmgFJeB4IPciOY/w640-h156/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 1: Función que obtiene aplicaciones instaladas.</div><div style="text-align: center;"><br /></div><div style="text-align: left;">Tras ejecutar el script, con un servidor alojando múltiples bases de datos, no obtendremos nada adicional, como vemos a continuación.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF1IbMv9Ss1IE9T9JHMramjk9B4cdQvk90Mfh8fky2gYK3obTozyGjH_RRyEQNxHHlUh3bPS5kLZna52c_T92r03GWIBgj0OjPoJJ5pGN0kr5mzb6Be4rgNRHRWXeq1N6jHyqA7AqxEzE/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="577" data-original-width="1102" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF1IbMv9Ss1IE9T9JHMramjk9B4cdQvk90Mfh8fky2gYK3obTozyGjH_RRyEQNxHHlUh3bPS5kLZna52c_T92r03GWIBgj0OjPoJJ5pGN0kr5mzb6Be4rgNRHRWXeq1N6jHyqA7AqxEzE/w640-h336/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 2: Múltiples base de datos, no permite listar aplicaciones.</div><div><br /></div>Y si no esta el recursos disponible, tendremos como resultado un 404, como se muestra a continuación.<div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxcyAu0ca1_PqTEQoHOwbq4fDlnZ5_xBxA2nKy1cyD0eh7yax3rsoIxQsnUM84hoK88RRXy3t9wDLPLPKN0EdmrQEwdEn8qawTn2RFdG2BWJgvPhYpZUo_n0rjd-wda4j6AD2Dkq2nCcI/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="490" data-original-width="984" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxcyAu0ca1_PqTEQoHOwbq4fDlnZ5_xBxA2nKy1cyD0eh7yax3rsoIxQsnUM84hoK88RRXy3t9wDLPLPKN0EdmrQEwdEn8qawTn2RFdG2BWJgvPhYpZUo_n0rjd-wda4j6AD2Dkq2nCcI/w640-h318/image.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;">Imagen 3: Not found, website/info.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUv8-WMc_He227Nw9DW2PMd9OH-gCBM_MlrGy41g3URO7ffwWIIv_Jkje1KDS_SNLFDfguesvTJH7PwVEfTuZ6gEe98cx6IL8_kJdX5LU5mKYpbdIQUluMHqTqxxEqCzaVkjfapZL9MIQ/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="972" data-original-width="1082" height="575" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUv8-WMc_He227Nw9DW2PMd9OH-gCBM_MlrGy41g3URO7ffwWIIv_Jkje1KDS_SNLFDfguesvTJH7PwVEfTuZ6gEe98cx6IL8_kJdX5LU5mKYpbdIQUluMHqTqxxEqCzaVkjfapZL9MIQ/w640-h575/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 4: Listando aplicaciones instancia Odoo.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Como notamos, en los casos correctos, obtendremos el listado de aplicaciones instaladas en la instancia del servidor, con el cual ya tendremos información para verificar la seguridad de las aplicaciones. En las próximas entradas estaremos agregando mas funcionalidad al script, el cual puedes clonar, para testear.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">Saludos.</div><div style="text-align: left;">Lexer Pars.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://github.com/lexerpars/odoo_hacking" target="_blank">Script Odoo Hacking</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-i.html" target="_blank">Odoo Hacking I</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ii.html" target="_blank">Odoo Hacking II</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iii.html" target="_blank">Odoo Hacking III</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iv.html" target="_blank">Odoo Hacking IV</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-v.html" target="_blank">Odoo Hacking V</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vi.html" target="_blank">Odoo Hacking VI</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vii.html" target="_blank">Odoo Hacking VII</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-viii.html" target="_blank">Odoo Hacking VIII</a></div></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ix.html" target="_blank">Odoo Hacking IX</a></div></div><div><br /></div><br /><br /><p></p></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-16460655877919227502022-01-14T04:52:00.007-08:002022-01-28T03:34:34.489-08:00Odoo hacking III<p> Como hemos observado con anterioridad, para fijar la conexión xmlrpc a Odoo, son importantes 3 cosas, el usuario, la clave y la base de datos, en nuestro script de <a href="https://github.com/lexerpars/odoo_hacking.git" target="_blank">Odoo hacking</a>, tenemos el método listar base de datos directamente, sin embargo en muchos de los casos esto no es posible, debido a problemas de acceso, esto se debe a que el archivo de configuración tiene el parámetro db_list como False.</p><p style="text-align: justify;">Sin embargo hay otro mecanismo para obtener el nombre de la base de datos, el cual se basa en <a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-ii.html" target="_blank">registro y recuperación de contraseña</a>, desde luego, no todas las implementación de Odoo tiene habilitado esto, usualmente se tiene disponible al tener tienda en lineal o ecommerce.</p><p style="text-align: justify;">Agregaremos esta funcionalidad al script, para detectar cuando permita el poder registrarse como usuario de portal, en Odoo y tenga habilitado la recuperación de contraseña. </p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP6jCeRchArW2SDXWUFtc7T6omhPpCHwVyTSEBSgWEyV3ApbGEv6nq-48yxMIPL-A4sLp18nErfEMT5kmKzS5uBa-l9J5HDd3e8oy08A_I_LzIzBoSnCFETRI5v0jrFHQed4SzLUt5A64/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="278" data-original-width="944" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP6jCeRchArW2SDXWUFtc7T6omhPpCHwVyTSEBSgWEyV3ApbGEv6nq-48yxMIPL-A4sLp18nErfEMT5kmKzS5uBa-l9J5HDd3e8oy08A_I_LzIzBoSnCFETRI5v0jrFHQed4SzLUt5A64/w640-h188/image.png" width="640" /></a></div></div>Imagen 1: Funcionalidad para detectar registro y restablecimiento.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div style="text-align: justify;">Con esto ya tendremos habilitado, la detección de esta información, si realizamos una prueba de esto, veremos el siguiente resultado.</div><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC5vztGK9_VBKH5PD66xLWbVHd835ncl2Um_bCYfYtg93UUzqoSvJZAzrUHQek7LdSdpkqbK5ec7GF25fQQmffhEP_pVbRwyyThAL6qTkjVr3rnkvMwx9UwpQude3ofNvKT3fripg6auE/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="490" data-original-width="982" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC5vztGK9_VBKH5PD66xLWbVHd835ncl2Um_bCYfYtg93UUzqoSvJZAzrUHQek7LdSdpkqbK5ec7GF25fQQmffhEP_pVbRwyyThAL6qTkjVr3rnkvMwx9UwpQude3ofNvKT3fripg6auE/w640-h320/image.png" width="640" /></a></div>Imagen 2: Odoo hacking, reflejando disponibilidad en ambos métodos.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh7Vp8MXI66CqFFjQ3ADqtsvvWGgYZYehPaJa6ow7KT4IN8QEGAfw59bpko9MPcJZgINVaC2e2w15loluGw1BRfdSWTXT59SbVyhnk9oHdIYUAjh3fVlUTv0A8IqodLMVWw_lwLGa9tcQ/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="467" data-original-width="918" height="326" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh7Vp8MXI66CqFFjQ3ADqtsvvWGgYZYehPaJa6ow7KT4IN8QEGAfw59bpko9MPcJZgINVaC2e2w15loluGw1BRfdSWTXT59SbVyhnk9oHdIYUAjh3fVlUTv0A8IqodLMVWw_lwLGa9tcQ/w640-h326/image.png" width="640" /></a></div>Imagen 3: Odoo hacking, reflejando que no permite el registro de usuarios de portal.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtSPFOnnBE7OQm4_js43r6HNeWNBL3opy5uMD7sXeuY6J3y6Au-LTNNlQLgnYUEEjmSJoUWBrMCLTuZtC3aVejbWp625wWj-quQ53dHZfZa3oZrsACAQbwHbX3hBYHwJDzFs4kHHSk9aU/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="961" data-original-width="1907" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtSPFOnnBE7OQm4_js43r6HNeWNBL3opy5uMD7sXeuY6J3y6Au-LTNNlQLgnYUEEjmSJoUWBrMCLTuZtC3aVejbWp625wWj-quQ53dHZfZa3oZrsACAQbwHbX3hBYHwJDzFs4kHHSk9aU/w640-h322/image.png" width="640" /></a></div></div>Imagen 4: Odoo hacking, refleja que ninguno de los métodos, registro y recuperación. <br /><div style="text-align: left;"><br /></div><div style="text-align: justify;">La ultima imagen, si bien es cierto, nos retorna el listado de las bases de datos, nos refleja que no dispone de los métodos de registro de usuarios de portal, y tampoco permite recuperar la contraseña de los usuarios. En este tipo de casos, se puede optar por realizar ataques de fuerza bruta, a los usuarios y contraseñas. Pero esto lo incluiremos mas adelante en el script.</div><br /></div>Saludos.<div>Lexerpars.<br /><br /><p></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both;"><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://github.com/lexerpars/odoo_hacking" target="_blank">Script Odoo Hacking</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-i.html" target="_blank">Odoo Hacking I</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ii.html" target="_blank">Odoo Hacking II</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iii.html" target="_blank">Odoo Hacking III</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iv.html" target="_blank">Odoo Hacking IV</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-v.html" target="_blank">Odoo Hacking V</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vi.html" target="_blank">Odoo Hacking VI</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vii.html" target="_blank">Odoo Hacking VII</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-viii.html" target="_blank">Odoo Hacking VIII</a></div></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ix.html" target="_blank">Odoo Hacking IX</a></div></div></div><br /><p></p></div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-2288633302360559189.post-9077625684752196392022-01-13T06:00:00.008-08:002022-01-28T03:34:22.862-08:00Odoo hacking II<p>Ya recopilamos información básica de Odoo con nuestro script, sin embargo aun hace falta un largo recorrido para completar sus funcionalidades.</p><p>Otro método importante es listar las bases de datos, que posee un servidor, para ello emplearemos el método xmlrpc.</p><p></p><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZXAhysk-qXrRLZsEp5dQbHvzSy5Kv7ePnwrG2AcLscJWYBncd4J2zzuBZCDUUXcaaTQNLRVP4khw__mXGG4YhhclVxrYJ8LK9naX1Ko57-uQoAFOtpmny-0EN5v0I4zanGxHIb2_dJps/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="115" data-original-width="446" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZXAhysk-qXrRLZsEp5dQbHvzSy5Kv7ePnwrG2AcLscJWYBncd4J2zzuBZCDUUXcaaTQNLRVP4khw__mXGG4YhhclVxrYJ8LK9naX1Ko57-uQoAFOtpmny-0EN5v0I4zanGxHIb2_dJps/w640-h166/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 1: Método que obtiene el listado de base de datos.</div><div style="text-align: center;"><br /></div><div style="text-align: left;">El método de versión y base de datos, puedes probarlo en cualquier servidor, puesto que es información que puede ser obtenida sin caer en ninguna ilegalidad, para ello puedes emplear el siguiente dorck para google hacking : <b>allinurl:8069/web/database</b> .</div><br /><p></p><div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlj6STAmOK9cHAqaNrKWONIPu6B6PrGFFrTtx6J9e2pYjcKdRJoyYiOEJHL8_lNUVgXsr6G-WxNz3Sgm0bdO43UyG5o08B_7sG4K_hUONChVymNPQRHE3iW5OyUgjOONXOAgWwf95_6kY/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="967" data-original-width="1907" height="324" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlj6STAmOK9cHAqaNrKWONIPu6B6PrGFFrTtx6J9e2pYjcKdRJoyYiOEJHL8_lNUVgXsr6G-WxNz3Sgm0bdO43UyG5o08B_7sG4K_hUONChVymNPQRHE3iW5OyUgjOONXOAgWwf95_6kY/w640-h324/image.png" width="640" /></a></div></div><div style="text-align: center;">Imagen 2: Obteniendo listado de base de datos, servidor localizado en internet.</div><br /></div><div>Adicional a esto, debemos validar que este permitido el listar las base de datos por medio de xmlrpc, ya que si realizamos esto, sin validarlo, obtendremos un error de acceso denegado, como se muestra a continuación.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Wngztl6cIPt0dcqqHBn3Loki_QPoXh3kL5Z0xIe06hMSDdW5OAhyl0mShBqGDIvHmgtW8Aj18b6OIOxah0altipDLQ5D4v1l9dkcF2FVqb-JIM4oFY3n9-G1HrwRCntP4zMOho1WBf0/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="785" data-original-width="864" height="582" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7Wngztl6cIPt0dcqqHBn3Loki_QPoXh3kL5Z0xIe06hMSDdW5OAhyl0mShBqGDIvHmgtW8Aj18b6OIOxah0altipDLQ5D4v1l9dkcF2FVqb-JIM4oFY3n9-G1HrwRCntP4zMOho1WBf0/w640-h582/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 3: Acceso denegado db.</div><div style="text-align: left;"><br /></div><div style="text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5gJZNT-8Ed3zUhXPwoyOZeMUS3e6J3k9shC1sYRlE4ktH0-K_8nIxd37AqQBt78zXTCSlQk2L6mJ4U2ohQiulAGFf_VB6BLm4ywreT29mmGoxtTStPZX1MzANwCbH2nEDol100i1YObs/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="292" data-original-width="1013" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5gJZNT-8Ed3zUhXPwoyOZeMUS3e6J3k9shC1sYRlE4ktH0-K_8nIxd37AqQBt78zXTCSlQk2L6mJ4U2ohQiulAGFf_VB6BLm4ywreT29mmGoxtTStPZX1MzANwCbH2nEDol100i1YObs/w640-h184/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 4: Validación de acceso denegado.</div><div style="text-align: center;"><br /></div><div style="text-align: left;">Con esto ya tendremos preparados los métodos versión y db, con lo cual podremos obtener la información básica de Odoo, así como las bases de datos que tiene disponible.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaD2mQcqTC6lahDhdIFkCRcYZpydHFcH3jNrP3NGmD4TMyGzO1mZNiiqgktDnrlSRtJcN_kyK0yZRQROcBlyAUGGrl0hWuK4gycoXc9WYq4BHlc12Yznic9tNZHMNP7S5XbrG5-LvnXAA/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="444" data-original-width="1034" height="274" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaD2mQcqTC6lahDhdIFkCRcYZpydHFcH3jNrP3NGmD4TMyGzO1mZNiiqgktDnrlSRtJcN_kyK0yZRQROcBlyAUGGrl0hWuK4gycoXc9WYq4BHlc12Yznic9tNZHMNP7S5XbrG5-LvnXAA/w640-h274/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 4: Listando información básica y base de datos.</div><div style="text-align: center;"><br /></div><div style="text-align: left;">Saludos.</div><div style="text-align: left;">Lexerpars.</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://github.com/lexerpars/odoo_hacking" target="_blank">Script Odoo Hacking</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-i.html" target="_blank">Odoo Hacking I</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ii.html" target="_blank">Odoo Hacking II</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iii.html" target="_blank">Odoo Hacking III</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iv.html" target="_blank">Odoo Hacking IV</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-v.html" target="_blank">Odoo Hacking V</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vi.html" target="_blank">Odoo Hacking VI</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vii.html" target="_blank">Odoo Hacking VII</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-viii.html" target="_blank">Odoo Hacking VIII</a></div></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ix.html" target="_blank">Odoo Hacking IX</a></div></div></div><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-48107639184712339072022-01-12T06:00:00.090-08:002022-01-28T03:34:08.597-08:00Odoo hacking I<p style="text-align: justify;">Hace algunos días abordamos el tema de la seguridad en el ERP Odoo, y como es posible "hackear Odoo", aprovechando una mala implementación del sistema, así como malas practicas al momento de desarrollar nuevos módulos.</p><p style="text-align: justify;">En las siguientes entradas veremos como crear nuestro propio script para automatizar las tareas de realizar una auditoria de seguridad a nuestro sistema ERP Odoo, esto debido a que no hay muchas, si es que ningún script para auditar este sistema 100% dedicado a Odoo. Este script lo trabajaremos en el repositorio de git de <a href="https://github.com/lexerpars/odoo_hacking" target="_blank">odoo_hacking</a>, el cual puedes descargar para utilizarlo.</p><p style="text-align: justify;">Iniciaremos con algo básico, para ello emplearemos el lenguaje de programación python, en mi caso empleare el Spyder como entorno de desarrollo. </p><p style="text-align: justify;">Empezaremos solicitando un parámetro, el cual es el host donde se aloja Odoo, esto nos servirá en adelante, ya será nuestro objetivo para realizar la auditoria.</p><p style="text-align: justify;">Como primer punto, debemos conocer el sistema que vamos a auditar, si bien es cierto, sabemos que es Odoo, aun debemos determinar que versión es, puesto que hay muchas versiones, y las mas vulnerables son las mas antiguas y las mas recientes. Esto es porque las versiones antiguas tienen menos soporte, la prioridad suelen ser versiones mas recientes. Por otro lado, las versiones mas recientes, en este caso la versión 15, existen muchos bugs que salen con frecuencia, debido a su reciente salida al mercado. Aunque existen versiones estables, como lo son la 13 y 14, aunque suelen ser estables, pueden ser objeto de ataque.</p><p style="text-align: justify;">Además de lo anterior, debemos conocer si es Enterprise o Comunitaria, aunque la seguridad es buena en Odoo, puede lleguemos a punto, donde encontremos una vulnerabilidad en un modulo Enterprise, el cual nos será imposible auditar bajo una Comunitaria.</p><p style="text-align: justify;">Para obtener esta información, debemos invocar el método versión, por medio del protocolo xmlrpc, este método puede ser llamado sin estar autenticado en el sistema de Odoo.</p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeHZyGMPV0wx0ct0fye0lB8cZozIHBTiYH3j7b5ycbboKzojwYqsQyi8ohlur607chj8QuToPo3R1hkXriPY4T8GLeXjo_IscYgXXgPavoH8i5zFYeHmgCe-hphZ8w2e_Ce-_FXsO9H-k/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="726" data-original-width="987" height="470" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeHZyGMPV0wx0ct0fye0lB8cZozIHBTiYH3j7b5ycbboKzojwYqsQyi8ohlur607chj8QuToPo3R1hkXriPY4T8GLeXjo_IscYgXXgPavoH8i5zFYeHmgCe-hphZ8w2e_Ce-_FXsO9H-k/w640-h470/image.png" width="640" /></a></div>Imagen 1: Código para obtener la versión de Odoo.<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHulu2xv-disnCnjLBjBrxzseUBRO050A9UFOIJ41aAL5_gTv8rJzpQn0Hr4Cs9pFd3CD2HlhLW4sHso3BNPv2GNvuuwHZx7kJhtXElzFsNDSkWHeRosw2npypkgLyaLDteNo9g2mbZPE/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="768" data-original-width="871" height="565" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHulu2xv-disnCnjLBjBrxzseUBRO050A9UFOIJ41aAL5_gTv8rJzpQn0Hr4Cs9pFd3CD2HlhLW4sHso3BNPv2GNvuuwHZx7kJhtXElzFsNDSkWHeRosw2npypkgLyaLDteNo9g2mbZPE/w640-h565/image.png" width="640" /></a></div></div><div class="separator" style="clear: both; text-align: center;">Imagen 2: Script Odoo hacking main.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg_0GoD_Jf3X4mP8Nef0MuGImL1b32-W5zm-QqUeX0YyQo4_gQ4MrshBV9VQ1x9fsAKkZslyAeOLK1R6NoZxFqF4CzS0zSoQTMbM5Jwzkwz-TxpOowCDzkTxaXAX8ZlZ06axE9c8FiymI/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="426" data-original-width="1147" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg_0GoD_Jf3X4mP8Nef0MuGImL1b32-W5zm-QqUeX0YyQo4_gQ4MrshBV9VQ1x9fsAKkZslyAeOLK1R6NoZxFqF4CzS0zSoQTMbM5Jwzkwz-TxpOowCDzkTxaXAX8ZlZ06axE9c8FiymI/w640-h238/image.png" width="640" /></a></div></div></div><div class="separator" style="clear: both; text-align: center;">Imagen 3: Ejecución de script para obtener versión.</div><div><br /></div>En las próximas entradas estaremos agregando mas funcionalidades al script, para que nos permita realizar una auditoria mas amplia de Odoo.<div><br /></div><div>Saludos.</div><div>Lexerpars.<br /><br /><p></p></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://github.com/lexerpars/odoo_hacking" target="_blank">Script Odoo Hacking</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-i.html" target="_blank">Odoo Hacking I</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ii.html" target="_blank">Odoo Hacking II</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iii.html" target="_blank">Odoo Hacking III</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-iv.html" target="_blank">Odoo Hacking IV</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-v.html" target="_blank">Odoo Hacking V</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vi.html" target="_blank">Odoo Hacking VI</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-vii.html" target="_blank">Odoo Hacking VII</a><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-viii.html" target="_blank">Odoo Hacking VIII</a></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/odoo-hacking-ix.html" target="_blank">Odoo Hacking IX</a><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-31631311259952026332022-01-11T06:00:00.001-08:002022-01-14T21:38:34.971-08:00Conclusión programación insegura y seguridad por obscuridad<p style="text-align: justify;">Después de realizar múltiples ataques, en su mayoría de fuerza bruta, logramos ir escalando privilegios, partiendo desde una cuenta de portal en Odoo, obteniendo un usuario interno de Odoo, mediante la recopilación de información en el sistema, basado en malas practicas al momento de implementar Odoo, seguidamente explorar aplicaciones con códigos inseguros, realizando ataques de fuerza bruta a funciones de modelos y parámetros que estas reciben. Por ultimo comprometer el servidor, debido a un código inseguro en una aplicación de backups, hasta llegar al usuario root.</p><p style="text-align: justify;">Para evitar esto, es recomendable realizar una implementación correcta y segura de Odoo. Hay muchas cosas a tomar en cuenta. Por mencionar algunas:</p><p style="text-align: justify;"></p><ol><li>Utilizar claves seguras en los servicios.</li><li>No utilizar claves repetidas para los servicios.</li><li>Fijar políticas de claves robustas para los usuarios.</li><li>De ser posible, emplear autenticación de 2 factores.</li><li>Tras una instalación de Odoo, atacarlo y confirmar la solides.</li><li>Utiliza certificados SSL.</li><li>Realiza un proceso de hardening al servidor.</li><li>Utilizan un filtrado de puerto y no dejes expuestos servicios sin razón alguna.</li><li>Utiliza servidores separados para Odoo y Postgres o tu motor de base de datos.</li><li>Realizar pruebas de funcionalidad y seguridad a los módulos o programación.</li><li>Realiza auditorias de seguridad de manera recurrente.</li><li>Mantén actualizado el sistema con los últimos parches.</li></ol><div>Están son 12 medidas mínimas que se deben realizar, para garantizar que el sistema este protegido, desde luego que hay otro gran grupo de medidas de seguridad que se pueden agregar, pero ya veremos en el transcurso de este año.</div><div><br /></div><div>Saludos.</div><div>Lexer Pars.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por.html" target="_blank">Programación insegura y seguridad por obscuridad I</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_0404538857.html" target="_blank">Programación insegura y seguridad por obscuridad II</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_01118948894.html" target="_blank">Programación insegura y seguridad por obscuridad III</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_9.html" target="_blank">Programación insegura y seguridad por obscuridad IV</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.guatewares.com/2022/01/conclusion-programacion-insegura-y.html" target="_blank">Conclusión Programación insegura y seguridad por obscuridad</a></div></div><p></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-20291420967562868852022-01-10T06:30:00.001-08:002022-01-14T21:37:32.611-08:00Programación insegura y seguridad por obscuridad IV<p style="text-align: justify;">Dentro del servidor, con una conexión ssh, examinaremos la configuración del sistema Odoo, regularmente se encuentra en /etc/odoo-server.conf., en mi caso, al ubicar el archivo, este no se encuentra disponible. Podemos ubicarlo, sin embargo, emplearemos el comando history, para saber que sucedió antes que tuviéramos acceso al mismo.</p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_eNXkPIWPG5ZVQ3ol6xOVByNnKaPXVMrfWnsZWiIAudMjhxolMiG40a2Xv9FUBQGMAMzVXfj15oqqpnM9N0HF4WIEUXFGd0GNHx3yoSB7gmjqAsxUwdOkO5Xpb2dTioHAlyz38iyaJJ8/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="399" data-original-width="1866" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_eNXkPIWPG5ZVQ3ol6xOVByNnKaPXVMrfWnsZWiIAudMjhxolMiG40a2Xv9FUBQGMAMzVXfj15oqqpnM9N0HF4WIEUXFGd0GNHx3yoSB7gmjqAsxUwdOkO5Xpb2dTioHAlyz38iyaJJ8/w640-h136/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 1: Ubicando archivo de configuración de Odoo.</div><br /><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhszCdyUqE5CPwmv2gWT3xUFCIdz869d4MeBT76yZlo3wsUQIqTgyn3DmRrl4K5OppiDMAk28j6OctK7J-7Y0eZFVLkhQn6RGtcZ2N4uqJlRz6vuJ4DoxnKHzQYw-8TtncDxTNpHVm5XC8/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1001" data-original-width="1838" height="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhszCdyUqE5CPwmv2gWT3xUFCIdz869d4MeBT76yZlo3wsUQIqTgyn3DmRrl4K5OppiDMAk28j6OctK7J-7Y0eZFVLkhQn6RGtcZ2N4uqJlRz6vuJ4DoxnKHzQYw-8TtncDxTNpHVm5XC8/w640-h348/image.png" width="640" /></a></div>Imagen 2: Comando history.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div style="text-align: justify;">Después de ejecutar el comando history, obtenemos el archivo de configuración. el cual se encuentra el home de odoo, llamado .odoo-server. Para ello realizamos un cat .odoo-server. De lo anterior, quisiera resaltar 2 aspectos importantes, contamos con una contraseña para la base de datos, y una contraseña master odoo, la cual permite habilitar un crud para base de datos.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYyEatKCfWO9_8M3SaJBGw1kHlitDP02C9Q2gwPS5ogaJReNBd1hLZFiANLPytLRHapZtsEolEdAYoN61NpezsjXvQZKCCNpBePh3pVyi2vqHOcT13lWSwmBB7I_YagI25yex1vFNLXSE/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="187" data-original-width="425" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYyEatKCfWO9_8M3SaJBGw1kHlitDP02C9Q2gwPS5ogaJReNBd1hLZFiANLPytLRHapZtsEolEdAYoN61NpezsjXvQZKCCNpBePh3pVyi2vqHOcT13lWSwmBB7I_YagI25yex1vFNLXSE/w640-h282/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 3: Archivo de configuración de Odoo.</div><div style="text-align: center;"><br /></div><div style="text-align: left;">Intentamos ingresar a la cuenta root probando ambas claves, para ello ejecutamos sudo su.</div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPYvvAuKJNAEd3_eg8Z4_JNMjimo7XDWk72CY1k1IenvPdZbxn_OoVATkmkIqqY5gi9nF58OqUhBWDjqgHyweTnKyKa9SJQ6rNXV5tG2A3BF_qkiW_6BhfjdskYLYRv-GqbrWYD3r_b_8/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="66" data-original-width="1903" height="22" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPYvvAuKJNAEd3_eg8Z4_JNMjimo7XDWk72CY1k1IenvPdZbxn_OoVATkmkIqqY5gi9nF58OqUhBWDjqgHyweTnKyKa9SJQ6rNXV5tG2A3BF_qkiW_6BhfjdskYLYRv-GqbrWYD3r_b_8/w640-h22/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 4: Probando claves con root.</div><div style="text-align: center;"><br /></div><div style="text-align: left;"><br /></div><div style="text-align: justify;">Después de realizar esto, verificamos que la clave de root, es la misma que admin_passwd. Con esto hemos logrado acceder al 100% del servidor, esto debido a que el servidor de la base de datos y Odoo se encuentran en el mismo servidor. Lo cual resulto muy fácil, ya que el hecho de aplicar la misma contraseña para múltiples servicios, es una mala practica. Sin embargo, si no hubiera sido el caso, podríamos intentar crackear la clave por medio de <a href="https://es.wikipedia.org/wiki/John_the_Ripper" target="_blank">john</a>.</div><div style="text-align: left;"><br /></div><div style="text-align: justify;">Como puedes ver, el hecho se sumar una <a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-i.html" target="_blank">mala implementación en Odoo</a> y <a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por.html" target="_blank">utilizar programación insegura y agregando la seguridad por obscuridad</a>, dan como resultado un sistema totalmente expuesto ante ataques, que dejan comprometida toda la información del sistema, el sistema y el servidor en cuestión.</div><div style="text-align: justify;"><br /></div></div><div style="text-align: left;">Saludos.</div><div style="text-align: left;">Lexer Pars.</div><br /></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por.html" target="_blank">Programación insegura y seguridad por obscuridad I</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_0404538857.html" target="_blank">Programación insegura y seguridad por obscuridad II</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_01118948894.html" target="_blank">Programación insegura y seguridad por obscuridad III</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_9.html" target="_blank">Programación insegura y seguridad por obscuridad IV</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/conclusion-programacion-insegura-y.html" target="_blank">Conclusión Programación insegura y seguridad por obscuridad </a><br /></div><br /></div><br /><br /><p></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-76421469769382390862022-01-09T06:00:00.001-08:002022-01-14T21:37:56.204-08:00Programación insegura y seguridad por obscuridad III<div style="text-align: justify;">Para recapitular, hemos atacado por fuerza bruta, mediante xmlrpc, para obtener los nombres de las funciones de modelos y parámetros, con eso encontramos una función que nos permite ejecutar comandos directamente en el servidor, utilizando el usuario de Odoo.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Veremos como escalar privilegios, desde el usuario de Odoo, para ello, iniciaremos obteniendo el archivo /etc/passwd.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3g6jToTBez3JBSx9Rse2XV6QwKdrooM8BAWCoHuUrhGvq8S7l6wxeDRskM9X8JDTrS8lkXNC1mpk-waxnizpHQvgLum4kPSvRfEqhWg1cSGvB5T7yVEQOjprkpitSvo3m5usXPCXWrao/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="518" data-original-width="1259" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3g6jToTBez3JBSx9Rse2XV6QwKdrooM8BAWCoHuUrhGvq8S7l6wxeDRskM9X8JDTrS8lkXNC1mpk-waxnizpHQvgLum4kPSvRfEqhWg1cSGvB5T7yVEQOjprkpitSvo3m5usXPCXWrao/w640-h264/image.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;">Imagen 1: Comando cat /etc/passwd.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: justify;">Al listar los usuarios, comprobamos que hay un usuario llamado postgres, lo cual nos da la pauta que la probabilidad que la base de datos este instalada en el mismo servidor, lo cual, no es recomendable, aunque falta comprobar que esto es cierto. Verificaremos el archivo de configuración ssh, el cual se encuentra en /etc/ssh/sshd_config, para verificar si hay una configuración que nos limite el uso de este servicio, en este caso, nos permite autenticarnos con una clave publica.</div><div class="separator" style="clear: both; text-align: justify;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI199LrZOyWt_Jv2QNyRRoUiFqtTTL06mU_Ez0u-amknGOKlmVgdciNoOPjK-_ldr0C_lqBFv9L663R-6h-m4p0xc7K8DVZwbi1MVxRw59L9ezNIpR84JNwnEbnZROYbVDStGsPFgQNMU/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="663" data-original-width="1143" height="372" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI199LrZOyWt_Jv2QNyRRoUiFqtTTL06mU_Ez0u-amknGOKlmVgdciNoOPjK-_ldr0C_lqBFv9L663R-6h-m4p0xc7K8DVZwbi1MVxRw59L9ezNIpR84JNwnEbnZROYbVDStGsPFgQNMU/w640-h372/image.png" width="640" /></a></div>Imagen 2: Archivo de configuración servicio ssh.<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: justify;">Verificamos el archivo authorized_keys, para el usuario de odoo y confirmamos que hay una clave publica asignada.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyTyCnw14wk26KVTngUsuWAsy004Lc13C2NWFoj8qdtr8cAI4h_sf5Uu9_aOGUWp7BpgkAMt_HmXTTt5MrR4z93scVdIZmUP-OX7lC1qCglOEuYe0_gDM89ubSeRoU55_R8Icx4jZGxTg/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="84" data-original-width="1480" height="36" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyTyCnw14wk26KVTngUsuWAsy004Lc13C2NWFoj8qdtr8cAI4h_sf5Uu9_aOGUWp7BpgkAMt_HmXTTt5MrR4z93scVdIZmUP-OX7lC1qCglOEuYe0_gDM89ubSeRoU55_R8Icx4jZGxTg/w640-h36/image.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;">Imagen 3: Clave publica ssh.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: justify;">Procederemos a crear nuestra propia clave publica y privada, para autenticarnos al servidor. Con la clave publica, agregamos la clave publica al archivo authorized_key, mediante el comando echo public_key >> /home/odoo/.ssh/authorized_keys.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQGk9nFokS6ZhXG17csbmUlqAmUjirJQL5B-vhgicp3GxR8AXf8SOGP7ymi502_kmIMRa-wBCAxpTzryxy7gCon3kfNSyJDn3Db-7qUvtnEYpCzX5m16MoLKdR5uROxkzz0Fb8TIE9fNo/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="471" data-original-width="597" height="505" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQGk9nFokS6ZhXG17csbmUlqAmUjirJQL5B-vhgicp3GxR8AXf8SOGP7ymi502_kmIMRa-wBCAxpTzryxy7gCon3kfNSyJDn3Db-7qUvtnEYpCzX5m16MoLKdR5uROxkzz0Fb8TIE9fNo/w640-h505/image.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;">Imagen 4: Generación de clave publica y privada.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk1tmvkRVVowKYNPylarBV8uWoBzS8W8_5iFzqdsOdNSzxQSKuKiHUqGBQ9TVdu1c-oqVbq6kdJ0AugGKa29sUlPhLOUepqFGq9pdL2X8fibDfglEnAzbzurHVQgbMMtecTemQsVwFJU4/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="174" data-original-width="1537" height="72" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk1tmvkRVVowKYNPylarBV8uWoBzS8W8_5iFzqdsOdNSzxQSKuKiHUqGBQ9TVdu1c-oqVbq6kdJ0AugGKa29sUlPhLOUepqFGq9pdL2X8fibDfglEnAzbzurHVQgbMMtecTemQsVwFJU4/w640-h72/image.png" width="640" /></a></div>Imagen 5: Clave publica agregada al servidor.</div><div class="separator" style="clear: both; text-align: justify;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div style="text-align: justify;">Una vez realizado todo lo anterior, realizamos la conexión vía ssh al servidor, y confirmamos que ya tenemos acceso con el usuario odoo al servidor.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM_jc29SJaR69ucb3ELWEsU3myzi5LkM2orXRuW38bsXTOnokIy_ROYr60xPOkZ6yLJQZNMkjg79VTPWAvvaLTSRJOYwIaMM885FaoOPo3m5wkqOVrLp0IZwtru5WyTwKMb7_vBbPF2qU/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="446" data-original-width="626" height="456" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM_jc29SJaR69ucb3ELWEsU3myzi5LkM2orXRuW38bsXTOnokIy_ROYr60xPOkZ6yLJQZNMkjg79VTPWAvvaLTSRJOYwIaMM885FaoOPo3m5wkqOVrLp0IZwtru5WyTwKMb7_vBbPF2qU/w640-h456/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 6: Acceso a servidor mediante ssh, con usuario Odoo.</div><div style="text-align: center;"><br /></div><div style="text-align: justify;">Una vez conseguido acceso al servidor, veremos a que mas recursos tenemos acceso en el servidor, así como escalar privilegios dentro del servidor, en la próxima entrada.</div><br /></div><br /></div><div style="text-align: left;">Saludos.</div><div style="text-align: left;">Lexer Pars.</div><br /><div class="separator" style="clear: both;"><div class="separator" style="clear: both;"><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por.html" target="_blank">Programación insegura y seguridad por obscuridad I</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_0404538857.html" target="_blank">Programación insegura y seguridad por obscuridad II</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_01118948894.html" target="_blank">Programación insegura y seguridad por obscuridad III</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_9.html" target="_blank">Programación insegura y seguridad por obscuridad IV</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/conclusion-programacion-insegura-y.html" target="_blank">Conclusión Programación insegura y seguridad por obscuridad</a></div></div></div></div><br /><br /></div><br /><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-7668741405252914672022-01-08T06:00:00.001-08:002022-01-14T21:38:10.644-08:00Programación insegura y seguridad por obscuridad II<p style="text-align: justify;">Es muy importante prepara un diccionario con nombres de funciones o métodos, una fuente para obtener estos nombres es <a href="https://github.com/" target="_blank">github</a> , una vez preparado el diccionario, procedemos a realizar el ataque de fuerza bruta. En mi caso prepare un diccionario con 12,341 posibles nombres de función, de esto, obtuve 12 nombres de funciones, como se puede visualizar en la siguiente imagen.</p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv79J3Mub7xqiuO4dz7pq3ioGUjpQlHA4ZS8W6nBZIQjNc1lVpDEyr0FMwEopdenN-nw0HAZ307RFTpSvIV49qs7YPf_msF9c49xMRu7VW6fXCr5MMKYG5S1_enYf_t3uVmi_MdC_lWn4/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="581" data-original-width="1683" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv79J3Mub7xqiuO4dz7pq3ioGUjpQlHA4ZS8W6nBZIQjNc1lVpDEyr0FMwEopdenN-nw0HAZ307RFTpSvIV49qs7YPf_msF9c49xMRu7VW6fXCr5MMKYG5S1_enYf_t3uVmi_MdC_lWn4/w640-h220/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 1: Funciones encontradas por medio de fuerza bruta.</div><div style="text-align: center;"><br /></div><div style="text-align: justify;">Una vez enumeradas las funciones, podremos proceder a realizar un ataque de fuerza bruta a cada una de las funciones, para saber la cantidad de parámetros que recibe cada función y el tipo de dato que recibe, por defecto, siempre reciben 1 parámetro (self), por lo tanto si la función recibe 1 parámetro por parte adicional, mostrara que recibe 2 parámetros, en este caso, solo tendremos que enviar 1 parámetro a la función, como se muestra a continuación.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRyHVVYGiENUHJ5AyzAmsx2-3lAUSO-RanrVEpdC6KsxetYr88kO0bY4s9oIHzBDfr9PnGbHzQDfWs3_kRWvHeUhlXl1E5sWXj61jty3ujFHrFc-IRw8zV1b_40IWJvgpH7xdqh_R018/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="308" data-original-width="640" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRyHVVYGiENUHJ5AyzAmsx2-3lAUSO-RanrVEpdC6KsxetYr88kO0bY4s9oIHzBDfr9PnGbHzQDfWs3_kRWvHeUhlXl1E5sWXj61jty3ujFHrFc-IRw8zV1b_40IWJvgpH7xdqh_R018/w640-h308/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 2: Función requiere parámetros, pero solo recibe self.</div><div style="text-align: center;"><br /></div><div style="text-align: justify;">En mi caso las funciones encontradas son: ['write', 'search', 'read', 'get_dir', 'send_noti', '_noti', '_convert', 'save_disk_path', '_conn_ftp', 'validations', 'prepare_64', '_uni'] de las cuales, write, search,read, son nativas de odoo, es importante colocar funciones nativas, para confirmar que nuestro ataque se esta llevando acabo, las demás funciones, son propias del modulo. De todas las funciones propias del modulo, unicamente prepare_64 y save_disk_path reciben 1 parámetro adicional a self y de esas ultimas 2 save_disk_path no retorna absolutamente nada.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Al evaluar la ultima función, le enviamos un diccionario, y al fallar, nos refleja, un código posiblemente inseguro, el cual llama una funcion, llamada shell_bk, al tratarse de un modulo de copias de seguridad, quisiera imaginar, que lo usan, para almacenar copias en el mismo server, mediante la ejecución de comandos.</div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzMLPCDsMYQmYFfB1sUKI8gkHEt40DZxtHg2RqaP3UitQw1l0BLnfCFEf6CcISv09TR1Xk56AScpeXVQ6a1769p2DvCMxQYxKbetV26TfiUTJx7kHASIlnZJ5YjfvwuUi3yIhTqoipPb8/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="354" data-original-width="759" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzMLPCDsMYQmYFfB1sUKI8gkHEt40DZxtHg2RqaP3UitQw1l0BLnfCFEf6CcISv09TR1Xk56AScpeXVQ6a1769p2DvCMxQYxKbetV26TfiUTJx7kHASIlnZJ5YjfvwuUi3yIhTqoipPb8/w640-h298/image.png" width="640" /></a></div><br /><br /></div>Imagen 3: Función con posible shell.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div style="text-align: left;">Llegados a este punto, veremos si es una función para correr algún comando, para ello, haremos un simple "whoami", y el resultado es, que logramos ejecutar el comando directamente.</div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1RMtkIKCVwOyZn8omFzO83-9f40SGloSgpe1z_lX9liF_UTSfYA373-X-4CCOsZ2lPRREKt7Ix3MnVaEFuDNU-gED7IujRFkkPoMlCFuZPk6IkU8Ip_1tr1EDWB6L9oKdjFdHyZDQbg8/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="411" data-original-width="938" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1RMtkIKCVwOyZn8omFzO83-9f40SGloSgpe1z_lX9liF_UTSfYA373-X-4CCOsZ2lPRREKt7Ix3MnVaEFuDNU-gED7IujRFkkPoMlCFuZPk6IkU8Ip_1tr1EDWB6L9oKdjFdHyZDQbg8/w640-h280/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 4: Ejecutando whoami.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4oO8JRJl4u1zxPOXZXdG1i1OVZLBFO2ChkNz6Z6DuTcCxCNJFe6Mw2hAcgXrHx9-L_B6q2hSlkgR1cNR75Gc7QTvl5IQQc_nRQR1wD_deSgJF9OpY5Nem0gIIbUQkss2XBZugkiaxn48/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="437" data-original-width="936" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4oO8JRJl4u1zxPOXZXdG1i1OVZLBFO2ChkNz6Z6DuTcCxCNJFe6Mw2hAcgXrHx9-L_B6q2hSlkgR1cNR75Gc7QTvl5IQQc_nRQR1wD_deSgJF9OpY5Nem0gIIbUQkss2XBZugkiaxn48/w640-h298/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 5: Listando directorio del servidor.</div><br /></div>Por ultimo, trataremos de obtener acceso total al servidor, lo cual, lo veremos en una tercera parte.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">Saludos.</div><div style="text-align: left;">Lexer Pars.</div><br /></div><div class="separator" style="clear: both;"><div class="separator" style="clear: both;"><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por.html" target="_blank">Programación insegura y seguridad por obscuridad I</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_0404538857.html" target="_blank">Programación insegura y seguridad por obscuridad II</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_01118948894.html" target="_blank">Programación insegura y seguridad por obscuridad III</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_9.html" target="_blank">Programación insegura y seguridad por obscuridad IV</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/conclusion-programacion-insegura-y.html" target="_blank">Conclusión Programación insegura y seguridad por obscuridad</a></div></div></div></div></div><p></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-41790854484418193342022-01-07T06:00:00.001-08:002022-01-14T21:38:23.659-08:00Programación insegura y seguridad por obscuridad I<p style="text-align: justify;">En los últimos días y debo agregar, algunos años ya, he trabajado mucho con el sistema Odoo, el cual es muy amigable y robusto. Así que en lo que va del año encontraran muchas entradas relacionadas al tema, tanto en temas de defensa, así como ataque al sistema Odoo. Anteriormente en una serie de entradas, observamos una de las formas de "<a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-i.html" target="_blank">hackear odoo</a>", esto basado en una mala implementación, políticas de contraseña débil, y mala gestión de accesos.</p><p style="text-align: justify;">Sin embargo, con todo lo anterior, únicamente se ha visto comprometido el sistema Odoo, ya que, el sistema esta diseñado para hacer frente a las diversidad de ataques existentes, como ataques de inyección sql, robo de sesiones, ejecución remota de código, etc.</p><p style="text-align: justify;">Todo esto esta muy, sin embargo, en muchas ocasiones los desarrolladores al momento de programar nuevos módulos para extender o crear nuevas funcionalidades al sistema, emplean código inseguro, el cual no es debidamente protegido, para que no pueda ser ejecutado por cualquier usuario y menos utilizando xmlrpc. </p><p style="text-align: justify;">A día de hoy, no se si existe un método o forma de listar todos los métodos disponibles para un modelo, desde xmlrpc, sin embargo, si existe una manera fácil de lista la mayoría de aplicaciones instaladas en una instancia de Odoo, para ello solo tienes que dirigirte a /website/info , como se muestra a continuación.</p><p style="text-align: justify;"><br /></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjitC6uHVe1aCl7GqWvb5EYGZbhGznn-q5kGDtd2DNMKQX1O7dYOWzfK3UI2YUmh1zTEsgu_hoXvcssfvhtJOSVsnx7cY04JzuHlqohuNQRa9zyXTjKV0TFScagVhuZOM_IPbc5tbZ4Od0/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="864" data-original-width="1240" height="446" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjitC6uHVe1aCl7GqWvb5EYGZbhGznn-q5kGDtd2DNMKQX1O7dYOWzfK3UI2YUmh1zTEsgu_hoXvcssfvhtJOSVsnx7cY04JzuHlqohuNQRa9zyXTjKV0TFScagVhuZOM_IPbc5tbZ4Od0/w640-h446/image.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;">Imagen 1: Aplicaciones instaladas</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: justify;">La idea de tener esta información, es buscar las aplicaciones instaladas, ya que hay muchas aplicaciones de terceros que se pueden descargar de <a href="https://github.com/">github </a>o bien de la <a href="https://apps.odoo.com/apps" target="_blank">apps de odoo</a> . Esto con el fin de tener todo el código fuente y explorar en busca de código inseguro. Si tienen el código, podrán tener acceso a todos los métodos de un modelo, que no estén protegidos de manera adecuada, al estar en un lenguaje como python, entenderlo es muy fácil, el siguiente código es un extracto, de una <a href="https://apps.odoo.com/apps/modules/13.0/einv_sa/#" target="_blank">aplicacion de odoo</a>, en la cual se puede observar el modelo <b>account.move</b> con algunos métodos disponibles.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIESevgB5XMO2q-iomxLKWuST26WkPm6fdCa1bjXJT-tzsoZaUXFtvlMN6t2edRqOXP4kWLgzEsXncHG9UFxt41ym2m7n0Z7O2pzJA7RD3TzFx3NSt6YQFY_jvcyusdycKR0fL0phhX2o/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="895" data-original-width="946" height="605" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIESevgB5XMO2q-iomxLKWuST26WkPm6fdCa1bjXJT-tzsoZaUXFtvlMN6t2edRqOXP4kWLgzEsXncHG9UFxt41ym2m7n0Z7O2pzJA7RD3TzFx3NSt6YQFY_jvcyusdycKR0fL0phhX2o/w640-h605/image.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;">Imagen 2: Código fuente, con métodos y modelo</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div style="text-align: justify;">Particularmente de todas las aplicaciones mostradas en la imagen 1, me llama la atención <b>Backups online drive, </b>sin embargo, este modulo a pesar de ser de terceros, es un modulo privado, puesto que al buscarlo por internet, no se encuentra el código fuente para descargarlo.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Al no disponer de código fuente, tendremos que realizar un ataque fuerza bruta, para adivinar que métodos están disponibles para un modelo, esto empleando xmlrpc, para ello tenemos que preparar un diccionario, con los posibles nombres de los métodos, que se nos ocurran, haya utilizado el o los desarrolladores, para un determinado modelo. Para ello podemos emplear la siguiente petición por medio de xmlrpc.</div><br /></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB-S-HfP-m9LOK9yjbcIk-UUdHWzjyIniK8ljGJPsliRxcvbjGORu6cmgwgA4K0mImDOKRKRO1MJGHg2IUeqrSWOTzYH9Nwv0A9A8dMaFfSwlIFZiqbJPKUnQ4zTImy8kTwx7GdqMvFhs/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="220" data-original-width="799" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB-S-HfP-m9LOK9yjbcIk-UUdHWzjyIniK8ljGJPsliRxcvbjGORu6cmgwgA4K0mImDOKRKRO1MJGHg2IUeqrSWOTzYH9Nwv0A9A8dMaFfSwlIFZiqbJPKUnQ4zTImy8kTwx7GdqMvFhs/w640-h176/image.png" width="640" /></a></div></div><div style="text-align: center;">Imagen 3: Código para fuerza bruta de métodos.</div><div style="text-align: center;"><br /></div><div style="text-align: center;"><div style="text-align: left;">Si el método no existe, recibiremos un mensaje como el siguiente</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv56g-CB1jLvZ-B1bdRNdGSATgzuV1T5PBB3bs1N7idDL0sclNPyK9zdqnG84Gz-WKgie3qT8wn9wxOr0dAx1Qj_yK0YL-V3DJ4OPZhmfAf2LiiTYR7QFQ6ElkrpR1fIC6oTOmno0lBXE/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="161" data-original-width="954" height="108" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv56g-CB1jLvZ-B1bdRNdGSATgzuV1T5PBB3bs1N7idDL0sclNPyK9zdqnG84Gz-WKgie3qT8wn9wxOr0dAx1Qj_yK0YL-V3DJ4OPZhmfAf2LiiTYR7QFQ6ElkrpR1fIC6oTOmno0lBXE/w640-h108/image.png" width="640" /></a></div>Imagen 4: El método no existe.</div><br /></div><div style="text-align: left;">Si encontramos un método que exista, recibiremos un mensaje como a continuación.</div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ6N8vUQM26xB7I1UxhKu1sdbZ6_YNdsnAPyLwztZJTopcNbp34v8ndjNpGGD1K0LzNoTd96EI6riHID2-E42hwc5uvuLkBMBvjI4Fxp6xSjSXC_h7FhAS3l7wS5_C_OxG8xYHDlwB_Xs/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="189" data-original-width="936" height="130" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ6N8vUQM26xB7I1UxhKu1sdbZ6_YNdsnAPyLwztZJTopcNbp34v8ndjNpGGD1K0LzNoTd96EI6riHID2-E42hwc5uvuLkBMBvjI4Fxp6xSjSXC_h7FhAS3l7wS5_C_OxG8xYHDlwB_Xs/w640-h130/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 5: Método existe, error parámetros.</div> </div><div style="text-align: left;">Cuando encontremos, si bien no todos los métodos, pero si un buen numero, faltara, de igual forma, adivinar la cantidad de parámetros que recibe dicho método, y si esto te parece poco, también hay que adivinar el tipo de dato que recibe en cada parámetro., algún string, un entero, una lista, un diccionario, set o conjuntos, matrices, funciones, modelos, etc.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWJoMMowSh1ML5-hAIkGJGsojEK_ONwAez7U0KFQjhr2TUld5uHMAHEPZOdc9V8XmIz3cHP3vMLAK84pG7JcVWlB0AYCnjnkEih0Y_ktldMJas0R69oXRvNdxS0VyuvoxbfzT0HWNbFKc/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="220" data-original-width="957" height="148" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWJoMMowSh1ML5-hAIkGJGsojEK_ONwAez7U0KFQjhr2TUld5uHMAHEPZOdc9V8XmIz3cHP3vMLAK84pG7JcVWlB0AYCnjnkEih0Y_ktldMJas0R69oXRvNdxS0VyuvoxbfzT0HWNbFKc/w640-h148/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 6 : Fuerza bruta a tipo de dato recibido por método.</div><div style="text-align: center;"><br /></div><div style="text-align: left;">En la siguiente entrada veremos como, seguir realizando este ataque, y aprovechar la programación insegura para atacar Odoo.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">Saludos.</div><div style="text-align: left;">Lexer Pars.</div><br /></div><div class="separator" style="clear: both;"><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por.html" target="_blank">Programación insegura y seguridad por obscuridad I</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_0404538857.html" target="_blank">Programación insegura y seguridad por obscuridad II</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_01118948894.html" target="_blank">Programación insegura y seguridad por obscuridad III</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/programacion-insegura-y-seguridad-por_9.html" target="_blank">Programación insegura y seguridad por obscuridad IV</a></div><div class="separator" style="clear: both;"><a href="https://www.guatewares.com/2022/01/conclusion-programacion-insegura-y.html" target="_blank">Conclusión Programación insegura y seguridad por obscuridad</a></div></div></div><br /><br /><p></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-88695402086314916192022-01-06T06:00:00.000-08:002022-01-14T05:16:00.433-08:00Atacando ERP Odoo - Conclusión<p>Durante las ultimas 4 entradas observamos una forma de atacar el sistema Odoo, sin embargo no es la única forma, pues, si bien no existe un numero grandes de exploits o vulnerabilidades conocidas que se puedan explotar, con algo de tiempo y dedicación se pueden encontrar y explotar.</p><p style="text-align: justify;">Por ello, es importante que si tienes Odoo o cualquier otro sistema expuesto y de cara a internet, realices una auditoria de seguridad, con la cual puedas determinar que puntos son débiles, están mal implementados o representan un riesgo para tu empresa y tu información.</p><p style="text-align: justify;">Además de la importancia de realizar un proceso de calidad sobre el código de los módulos instalados, ya que las malas practicas de desarrollo y la falta de evaluación de estos módulos, puede llevar a que publiques código que sea vulnerable a ataques que comprometan el sistema.</p><p style="text-align: justify;">Otro hecho que cabe mencionar, es la importancia de orientar a los usuarios, utilizar contraseñas robustas que sean difícil de vulnerar y la implementación de mecanismos de autenticación de 2 factores. También es recomendable realizar un proceso de <a href="https://www.guatewares.com/2014/03/hardening-i-de-iii.html">hardening</a> tanto al sistema como al servidor.</p><p style="text-align: justify;">Si estas interesado en realizar una auditoria a tu sistema o servidores o realizar un proceso de hardening , no dudes en ponerte en contacto conmigo,</p><p style="text-align: justify;"><br /></p><p style="text-align: justify;">Saludos,</p><p style="text-align: justify;">LexerPars</p><p style="text-align: justify;"><br /></p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-i.html" target="_blank">Atacando ERP Odoo I</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-ii.html" target="_blank">Atacando ERP Odoo II</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-iii.html" target="_blank">Atacando ERP Odoo III</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-iv.html" target="_blank">Atacando ERP Odoo IV</a></p></blockquote><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-conclusion.html" target="_blank">Atacando ERP Odoo - Conclusión </a></p><div><br /></div></blockquote>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-60664109772031153942022-01-05T06:00:00.000-08:002022-01-14T05:15:35.208-08:00Atacando ERP Odoo IV<p style="text-align: justify;">Llegados a esta publicación, habremos obtenido un listado de usuarios en el sistema de Odoo. Con este listado de usuarios prepararemos un vector de ataque. Ya que disponemos de un método de autenticación, podremos intentar hacer un ataque de fuerza bruta, para adivinar la clave de los usuarios en el sistema. Regularmente los usuarios utilizan claves simples de recordar, y los administradores de sistemas, en su mayoría, no fijan políticas de seguridad, para fijar contraseñas, de tal forma, que cumplan con un nivel de complejidad aceptado y no sean fáciles de adivinar, así como fijar una caducidad a las claves y no permitir usar contraseñas históricas.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsbJJDP6ZIWgzHHLW2Npp2fPLGIcxt_Pw8Y3cmQHTZXPwg0VCAkCejPlUC-SDrrtfGvqu2FAKUjiqqdMgDv7iRl1DhHmknjAnaiyxnmEwdzjQYQc_zB-4Gr-v7DHqcgMtiL8mrO-PoDzU/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="763" data-original-width="1759" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsbJJDP6ZIWgzHHLW2Npp2fPLGIcxt_Pw8Y3cmQHTZXPwg0VCAkCejPlUC-SDrrtfGvqu2FAKUjiqqdMgDv7iRl1DhHmknjAnaiyxnmEwdzjQYQc_zB-4Gr-v7DHqcgMtiL8mrO-PoDzU/w640-h278/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 1: Obtención de clave para usuario interno.</div><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: justify;">Cabe mencionar, que el ataque de fuerza bruta, tardara en base a la complejidad de la clave fijada por el usuario, así mismo de la potencia del equipo. Una obtenido el usuario, procedemos a autenticarnos al sistema con el usuario interno, para verificar a que tenemos acceso con el nuevo usuario.</div><br /><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEISRkrvNA9cKPghjfSBzWT6EcyOMAoLCXAj__6b7YfnzHicuCbZdblNOdkHG4aTSAN6E67S1kOxxuLc8q7F3uv_VAffxo32nOjhp884FB_xDTbH3_S1wcpdvutKq9Ud9qWbVWBaDy-S0/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="160" data-original-width="576" height="178" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEISRkrvNA9cKPghjfSBzWT6EcyOMAoLCXAj__6b7YfnzHicuCbZdblNOdkHG4aTSAN6E67S1kOxxuLc8q7F3uv_VAffxo32nOjhp884FB_xDTbH3_S1wcpdvutKq9Ud9qWbVWBaDy-S0/w640-h178/image.png" width="640" /></a></div></div><br /><br /></div>Imagen 2: Accediendo al sistema.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRGD4dO5t9ffStnFTv2ThJRnPuVN7uaJLbgNM_nV8Kp4JPMlB0VMefRIccptfl1duwBqpMcDs4Y2G3ymZA34cM5j0LqdV9LIJgrA8GtHi5v-Np7gGklKcdJMeLlScKpo7sQAfp1nKqAEw/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1000" data-original-width="1903" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRGD4dO5t9ffStnFTv2ThJRnPuVN7uaJLbgNM_nV8Kp4JPMlB0VMefRIccptfl1duwBqpMcDs4Y2G3ymZA34cM5j0LqdV9LIJgrA8GtHi5v-Np7gGklKcdJMeLlScKpo7sQAfp1nKqAEw/w640-h336/image.png" width="640" /></a></div><br />Imagen 3: Aplicaciones de Odoo, usuario interno.</div><div class="separator" style="clear: both; text-align: justify;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div style="text-align: justify;">Los modelos y vistas, así como los controladores, pueden limitarse por reglas de acceso, sin embargo, en muchas ocasiones muchos recursos están sin protección de lectura, incluso de escritura y en su mayoría, Odoo no te mostrada la información. Si embargo, para podemos jugar un poco el numero de acción. Las url están compuestas en su mayoría de esta forma: https://www.dominio.net/web#view_type=kanban&model=res.partner&action=814&menu_id=613 , action=814, es el numero de acción, cambiando numero podremos encontrar muchas cosas a las que visualmente seguramente no tendremos acceso.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLvaGUZ_VMtF68F9mCOG98VB-8VVPuINoWwlcUKIUHiX__SPKoesv-BopE2IUeMc0MMcV4MDLUlfP8xd2NWBuwWXx6Zj1jvutrcW3aQFB3tNPD9KhtR0UvrThUCUrIfQkfMyQVVeOwzOI/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="401" data-original-width="1898" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLvaGUZ_VMtF68F9mCOG98VB-8VVPuINoWwlcUKIUHiX__SPKoesv-BopE2IUeMc0MMcV4MDLUlfP8xd2NWBuwWXx6Zj1jvutrcW3aQFB3tNPD9KhtR0UvrThUCUrIfQkfMyQVVeOwzOI/w640-h136/image.png" width="640" /></a></div><br /><br /></div>Imagen 4: Contactos de Odoo - formato url action.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div style="text-align: left;">Si encuentras algo a lo que no tienes acceso, recibirás un error similar a este:</div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwIaCI42D3D_DFfxdmPpJmHfksN9DTvSb5b7fd8jboXOAP7m8XT7R7yrD5i0CqghxyFbOrJZVgmmI-DakfI_TQm-OuykFRwrs1JgOvxNhSFfwKCCPIhmy8QgLcsgC57XiVKB0-7ub5jyQ/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="943" data-original-width="1907" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwIaCI42D3D_DFfxdmPpJmHfksN9DTvSb5b7fd8jboXOAP7m8XT7R7yrD5i0CqghxyFbOrJZVgmmI-DakfI_TQm-OuykFRwrs1JgOvxNhSFfwKCCPIhmy8QgLcsgC57XiVKB0-7ub5jyQ/w640-h316/image.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;">Imagen 5: Regla de seguridad, no permite acceder a recurso.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: justify;">Odoo ofrece una manera fácil de localizar recursos, el cual se le conoce como buscador global, el cual lo localizas desde la vista principal de aplicación, buscas lo que necesitas, y te evitas algunos clicks, o te permite ubicar un recurso que no recordabas donde estaba ubicado, sin embargo, este no es útil al momento de ubicar recursos a los que no debes tener acceso, pero, si los tienes. Un ejemplo de esto, son los métodos de pago, si realizamos la búsqueda global, ocurrirá esto.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsiqiX6oeqGKIqItaMb1ShoC9bhFf1macFStwuZf6IgWwuAo_rsDvaSOB0g42Bz8x_ehzWPjD7_utQDBEm05c4j7W2BtmhDfLUE37B58yzuKVm0VQygLjAh8WiSIzfvYOEMbnYtLLZzbQ/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="992" data-original-width="1908" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsiqiX6oeqGKIqItaMb1ShoC9bhFf1macFStwuZf6IgWwuAo_rsDvaSOB0g42Bz8x_ehzWPjD7_utQDBEm05c4j7W2BtmhDfLUE37B58yzuKVm0VQygLjAh8WiSIzfvYOEMbnYtLLZzbQ/w640-h332/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 6 : Búsqueda de métodos de pago por búsqueda global sin resultados.</div><br /></div><div style="text-align: justify;">Sin embargo al momento de realizar la búsqueda por medio de numero de acción, el resultado será completamente diferente.</div></div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSnmYdtPjAh3z1tHkVf00Y53mj4E8QY98Lu-rORDFq92K3947Hn13OS8_7TSZDAS-aM2mKUus15WGT4_5xTUxFr7hCsD_Dqqrc-2tMb36cBRJPSjTY_LbWv8rZZVVOjV2Ohh_AcPq1pa8/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="988" data-original-width="1907" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSnmYdtPjAh3z1tHkVf00Y53mj4E8QY98Lu-rORDFq92K3947Hn13OS8_7TSZDAS-aM2mKUus15WGT4_5xTUxFr7hCsD_Dqqrc-2tMb36cBRJPSjTY_LbWv8rZZVVOjV2Ohh_AcPq1pa8/w640-h332/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 7: Búsqueda de métodos de pago por medio de action.</div><div style="text-align: center;"><br /></div><div style="text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz-vp0C1iKP56ljZUTaZ35pf1XaRcXZHqChgn_7P3I4cJlcXKJxe4GYyhNfOqIthLvXSlNio1wIoRt01WWKY8RtYJtZ_547Y0X-A9YrPLc9GyqydWQ6dye99HKtBshXuga9h-V91y2_QA/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="964" data-original-width="1910" height="324" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz-vp0C1iKP56ljZUTaZ35pf1XaRcXZHqChgn_7P3I4cJlcXKJxe4GYyhNfOqIthLvXSlNio1wIoRt01WWKY8RtYJtZ_547Y0X-A9YrPLc9GyqydWQ6dye99HKtBshXuga9h-V91y2_QA/w640-h324/image.png" width="640" /></a></div><br />Imagen 8: Credenciales credomatic visibles y con permiso de escritura.</div><br /><div style="text-align: justify;">Continuando con la búsqueda de recursos, no protegidos, encontramos los parámetros del sistema, de estos, caben resaltar a mi criterio, usuario de base de datos, password de base de datos (estos se especifican en un archivo de configuración) que son usados por un modulo para hacer conexiones directas a la base de datos, el código enterprise de la empresa, ya que si este ultimo es utilizado en otra base de datos, pueden tener problemas, debido a que bloquean la base de datos, y esto no les permitirá operar con normalidad.</div><div style="text-align: justify;"><br /></div></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifjFu50U6WOBSyVy6BhcF5b_w-fd2CUKoOmePLz7plZCvwSj15lpOkaXFYWZGXzmfimc4dOAoMrDXGoDglu5lhwyJuRknNawG8eo9lIZBpi2-XGXhEjrl4HsuwhCO9_Irh1RPjwVs6HpY/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="912" data-original-width="1908" height="306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifjFu50U6WOBSyVy6BhcF5b_w-fd2CUKoOmePLz7plZCvwSj15lpOkaXFYWZGXzmfimc4dOAoMrDXGoDglu5lhwyJuRknNawG8eo9lIZBpi2-XGXhEjrl4HsuwhCO9_Irh1RPjwVs6HpY/w640-h306/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 9: Parámetros del sistema.</div><div style="text-align: center;"><br /></div><div style="text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZul5QBXRM7jSX-2gjHz0IcNFHiHgyL6Il-fsiUPgGnKZls23-ln9lWnp72QIaX4hPu36S4qmEFgpLKGTPvIqhDBCwSfUcy_3BuZI3xRrpGhgzQ6xApmJInmO5a5xhd0dJPPqMg4uc9o4/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="501" data-original-width="858" height="374" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZul5QBXRM7jSX-2gjHz0IcNFHiHgyL6Il-fsiUPgGnKZls23-ln9lWnp72QIaX4hPu36S4qmEFgpLKGTPvIqhDBCwSfUcy_3BuZI3xRrpGhgzQ6xApmJInmO5a5xhd0dJPPqMg4uc9o4/w640-h374/image.png" width="640" /></a></div>Imagen 10: Listado de usuarios.<br /><br /></div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgscxgqN-nmYbFq5IDP5ExAejVXiUNNIdmhyphenhyphenES2w0J1SgBmKmb7TvFF92XJD73uFJVMeRR4lghx-26RATcTj63M-uWC0dEOX7ZuHF2FZNs-HnNE1ecU72vjvy-BXfhSVqLzqYLbq9wYrXQ/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="500" data-original-width="949" height="338" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgscxgqN-nmYbFq5IDP5ExAejVXiUNNIdmhyphenhyphenES2w0J1SgBmKmb7TvFF92XJD73uFJVMeRR4lghx-26RATcTj63M-uWC0dEOX7ZuHF2FZNs-HnNE1ecU72vjvy-BXfhSVqLzqYLbq9wYrXQ/w640-h338/image.png" width="640" /></a><br /><br /></div><div style="text-align: center;">Imagen 11: Cambiar clave de usuarios.</div><div style="text-align: center;"><br /></div><div style="text-align: justify;">Dentro de las opciones disponibles, tenemos el poder cambiar las contraseñas de los clientes, así como exportar la información disponible.</div><div style="text-align: left;">Saludos,</div><div style="text-align: left;">LexerPars.</div><br /></div><br /></div><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-i.html" target="_blank">Atacando ERP Odoo I</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-ii.html" target="_blank">Atacando ERP Odoo II</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-iii.html" target="_blank">Atacando ERP Odoo III</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-iv.html" target="_blank">Atacando ERP Odoo IV</a></p></blockquote><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-conclusion.html" target="_blank">Atacando ERP Odoo - Conclusión </a></p><br /><p></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-17181635379475294072022-01-04T06:00:00.000-08:002022-01-14T05:15:01.716-08:00Atacando ERP Odoo III<p style="text-align: justify;">Anteriormente observamos como autenticarnos mediante xmlrpc, con un usuario de portal de Odoo, ahora procederemos a obtener información, concretamente trataremos de listar todos los usuarios internos del sistema.</p><p style="text-align: justify;">Odoo se basa en la arquitectura <a href="https://es.wikipedia.org/wiki/Modelo%E2%80%93vista%E2%80%93controlador" target="_blank">MVC</a>, por lo tanto, necesitamos obtener la información del modelo res.users, el cual contiene toda la información de los usuarios, realizaremos una llamada al procedimiento remoto fields_get, para obtener todos los campos y tratar de obtener la información que nos sea de utilidad.</p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIQUzd6e5qBTL2qOLB7IvSXuEFV50Sy4wZ-kiBpSb7Qn2QX47KY5tGNmXC6s9AdaY09jB9jEQ3O6GmJ6kVdYwAnG2zKbGpmz-ZpXDOSBQpA_8QZLi8wpGyqf5WHE4UDQ-onbFwU5hvy6k/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="831" data-original-width="1838" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIQUzd6e5qBTL2qOLB7IvSXuEFV50Sy4wZ-kiBpSb7Qn2QX47KY5tGNmXC6s9AdaY09jB9jEQ3O6GmJ6kVdYwAnG2zKbGpmz-ZpXDOSBQpA_8QZLi8wpGyqf5WHE4UDQ-onbFwU5hvy6k/w640-h290/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 1: Obteniendo campos del modelo</div><div style="text-align: center;"><br /></div><div style="text-align: left;">Listamos todos los campos y concretamente, trataremos de obtener el campo login de los usuarios, esto es concretamente el correo electrónico con el cual se autentican.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBDTVUf7sTtZAMk9LMLboX7i4ErhzcKGYq18fosu2PSRezO9ZZpDtUcjNa6Amx7dihF4CoVk5iE-zTKgFQfI3B67xFRcRtCxaAdYMB3poquYnKA0OhR6gAHVqAGVSIcPR4VugfHRtKj8g/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="461" data-original-width="1287" height="230" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBDTVUf7sTtZAMk9LMLboX7i4ErhzcKGYq18fosu2PSRezO9ZZpDtUcjNa6Amx7dihF4CoVk5iE-zTKgFQfI3B67xFRcRtCxaAdYMB3poquYnKA0OhR6gAHVqAGVSIcPR4VugfHRtKj8g/w640-h230/image.png" width="640" /></a></div><br /><div style="text-align: center;">Imagen 2: Listando usuarios de Odoo.</div><div style="text-align: center;"><br /></div><div style="text-align: left;">Al tratar de listar todos los usuarios, observamos que solo nos retorna 1 registro, en este caso, es nuestro usuario, ya que existe una regla de acceso que únicamente nos permite leer el registro que corresponde a nuestro usuario, en este caso, dejaremos este modelo y buscaremos en otro.</div><div style="text-align: left;"><br /></div><div style="text-align: justify;">Un modelo importante, es mail,mail, este modelo registra todas las comunicaciones por correo electrónico realizadas automáticamente por el sistema, realizaremos una consulta, de todos los registros, para confirmar si tenemos acceso a lectura de todos los registros o únicamente donde este relacionado nuestro usuario.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaWIySfq9y12ItHQVOBYGHneaa_8-99g4a8L874Yu77173NgLJXkBTMUm4IVqAEzXr_FlULYtNJ898QPFmAx4EUoO3YcUn_7LrhG2fLCQwfYTrxrg9SdVH5-AUERH66eVdAmd97J7EmMw/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="839" data-original-width="1833" height="292" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaWIySfq9y12ItHQVOBYGHneaa_8-99g4a8L874Yu77173NgLJXkBTMUm4IVqAEzXr_FlULYtNJ898QPFmAx4EUoO3YcUn_7LrhG2fLCQwfYTrxrg9SdVH5-AUERH66eVdAmd97J7EmMw/w640-h292/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 3: Búsqueda en modelo mail.mail</div><div style="text-align: center;"><br /></div><div style="text-align: justify;">El resultado es una lectura de 48,618 registros, por lo tanto, en este caso, podremos leer todos los registros sin restricción. Nuevamente listamos los campos, para saber que información nos interesa obtener, en este caso, únicamente el campo email_to, la razón es fácil, obtendremos un listado de correos, tanto de clientes, proveedores, usuarios, etc. El objetivo es obtener los usuarios o correos de usuarios.</div><br /></div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb1UgqoEVCC1LTQUZyuzC4pdVt-LEgpZQI4yml2i3Mdp9uvJRgSnsoDCgFTji1a-G6Ni0BqBHJRE5Kz9UGaAmXyxkprL09o1so4gbf5xc4vPLMfCON9bNTGZISIyXFXniQWml98WTjHGA/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="815" data-original-width="1187" height="440" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb1UgqoEVCC1LTQUZyuzC4pdVt-LEgpZQI4yml2i3Mdp9uvJRgSnsoDCgFTji1a-G6Ni0BqBHJRE5Kz9UGaAmXyxkprL09o1so4gbf5xc4vPLMfCON9bNTGZISIyXFXniQWml98WTjHGA/w640-h440/image.png" width="640" /></a>Imagen 4: Listado de campos de mail.mail.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Después de haber realizado la consulta, obtenemos un listado de usuarios internos, como se muestra a continuación.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEginwmiYhELw9pzOhEgJZ5olCSBtvhehfs7QbQjeJGUnB_LPS7CiNl-csYRcAlRhjxw5e4nidyoxJnu-EufT9iuKU41VEJBma6a8JqUkrYhpGCtRuQk4yPlTOst3T30pooCvYjiTLh0jSI/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="763" data-original-width="1822" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEginwmiYhELw9pzOhEgJZ5olCSBtvhehfs7QbQjeJGUnB_LPS7CiNl-csYRcAlRhjxw5e4nidyoxJnu-EufT9iuKU41VEJBma6a8JqUkrYhpGCtRuQk4yPlTOst3T30pooCvYjiTLh0jSI/w640-h268/image.png" width="640" /></a></div><br /><div style="text-align: center;">Imagen 5: Listado de correo de usuarios internos.</div><div style="text-align: center;"><br /></div><div style="text-align: left;">En la próxima entrada prepararemos un vector de ataque, para acceder al sistema.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">Saludos.</div><div style="text-align: left;">Lexer Pars.</div></div><br /><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-i.html" target="_blank">Atacando ERP Odoo I</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-ii.html" target="_blank">Atacando ERP Odoo II</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-iii.html" target="_blank">Atacando ERP Odoo III</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-iv.html" target="_blank">Atacando ERP Odoo IV</a></p></blockquote><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-conclusion.html" target="_blank">Atacando ERP Odoo - Conclusión </a></p></blockquote></div></div><p></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-24684476003565399902022-01-03T06:00:00.000-08:002022-01-14T05:14:36.274-08:00Atacando ERP Odoo II<p style="text-align: justify;">Odoo tiene un servicio de <a href="https://es.wikipedia.org/wiki/XML-RPC" target="_blank">XML-RPC</a>, esto en palabras simples, es llamada a procedimientos de manera remota, leer, escribir, actualizar y eliminar, sobre registros, adicional a esto, se pueden llamar procedimientos o funciones definidas, siempre y cuando se tenga acceso al recurso remoto.</p><p style="text-align: justify;">La <a href="https://www.odoo.com/documentation/15.0/developer/misc/api/odoo.html" target="_blank">documentación oficial</a> te brinda información y ejemplos de como establecer la conexión mediante este protocolo. Primero obtendremos la versión del sistema ERP, para ello haremos un pequeño programa en Python, como muestra la siguiente imagen.</p><p style="text-align: justify;"><br /></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXyVvMYOD3Kq8HTlyZxGWIZMAiEyLZW1YaY2itXWUT8mO0_z_YhEAIWxP8GkHc7BTrHaT2RzW7FDsxZiI4RF0NCIayMxnIkCdBYoCoNevfVUnm6uL4DsTTSCV3jzSnKtTTbUncyWl2sR8/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="702" data-original-width="1729" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXyVvMYOD3Kq8HTlyZxGWIZMAiEyLZW1YaY2itXWUT8mO0_z_YhEAIWxP8GkHc7BTrHaT2RzW7FDsxZiI4RF0NCIayMxnIkCdBYoCoNevfVUnm6uL4DsTTSCV3jzSnKtTTbUncyWl2sR8/w640-h260/image.png" width="640" /></a></div><br /><div style="text-align: center;">Imagen 1: Obteniendo la versión del sistema ERP por medio de xmlrpc</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Seguidamente debemos autenticarnos en el sistema ERP, para ello utilizaremos las credenciales con las cuales nos registramos anteriormente. Para realizar la autenticación es importante obtener el nombre de la base de datos. Para ello podemos lograrlo accediendo a la ip o dominio y concatenar /web/database/manager , como se muestra a continuación.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtvzwkP-kn6kWr0At_XysseCIpRkN2k0W3zQcDX9oZSwrml1AmTIpEuatyz827KWvy4606KpkOgMCHYa-b_C2Ve74QsXH78Sz4kbP1TScr7RS-93UHHdkVRyVEI-05yCQdUp1yQk-v31M/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="377" data-original-width="829" height="292" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtvzwkP-kn6kWr0At_XysseCIpRkN2k0W3zQcDX9oZSwrml1AmTIpEuatyz827KWvy4606KpkOgMCHYa-b_C2Ve74QsXH78Sz4kbP1TScr7RS-93UHHdkVRyVEI-05yCQdUp1yQk-v31M/w640-h292/image.png" width="640" /></a></div><br /></div><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><div style="text-align: center;">Imagen 2: Obtener nombre de la base de datos.</div></blockquote><div style="text-align: justify;"><br /></div><div style="text-align: left;">También es posible obtener el listado de bases de datos por medio de xmlrpc, como se muestra en la siguiente imagen.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXirriqJtLdgonba85NEunTibr5a69sItwc6bvGO1ZBkEOMzWqQCXRB0lgk1z_EEZJwyu9Sjt8Lq1TsWUZPcZV-9m6x9ehye5FDsEefH5gqS3Q2YCT9XfY-Fij_rcxZM4jY9Ir87B3Qt0/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="750" data-original-width="1917" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXirriqJtLdgonba85NEunTibr5a69sItwc6bvGO1ZBkEOMzWqQCXRB0lgk1z_EEZJwyu9Sjt8Lq1TsWUZPcZV-9m6x9ehye5FDsEefH5gqS3Q2YCT9XfY-Fij_rcxZM4jY9Ir87B3Qt0/w640-h250/image.png" width="640" /></a></div><br /><div style="text-align: center;">Imagen 3: Listar base de datos por xmlrpc.</div><div style="text-align: left;"><br /></div><div style="text-align: justify;">Ambos métodos son útiles, sin embargo, en cierto casos, ninguno de los 2 métodos anteriores pueden funcionar, ya que el administrador puede bloquear estos, de tal forma que al acceder a url antes mencionada, no muestra absolutamente nada o bien te redirija al home, esto sucede lo mismo con xmlrpc, limita el acceso a dicho recurso.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Si este fuera el caso, aun tenemos otro método para obtener el nombre de la base de datos, en este caso, sera restableciendo la contraseña del usuario de portal que registramos con anterioridad. Para realizar eso nos dirigimos al login de Odoo.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGX212J7ZcR2h_vc69vz6l8XDnveoirSAD6wWq5TLXZRmX86HYiySQUw_JYH-J7LLz6L-B2qE4e9fwdYZBOImtDLHvbgqXrvNZWdZmFBemcJAxNJmtAXwkojWWHfTldriDOllOJSFyiUA/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="603" data-original-width="859" height="450" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGX212J7ZcR2h_vc69vz6l8XDnveoirSAD6wWq5TLXZRmX86HYiySQUw_JYH-J7LLz6L-B2qE4e9fwdYZBOImtDLHvbgqXrvNZWdZmFBemcJAxNJmtAXwkojWWHfTldriDOllOJSFyiUA/w640-h450/image.png" width="640" /></a></div><br /><div style="text-align: center;">Imagen 4: Restablecer contraseña Odoo.</div><div style="text-align: center;"><br /></div><div style="text-align: left;">Seguidamente ingresamos el correo y presionamos restablecer. Esto nos enviara un correo, con una url para restablecer la contraseña, en dicha url, estará incluido el nombre de la base datos, donde estamos registrados.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbDgHz8m_J6nRZbLNmdBPmISRRGD7WZiylvDRAEMBpjFFlTwwKBNJOAIDEvr7kCrtNiLjcYuHCj8IeJjdz2I456hveh76Q-bk6taNzrz0g92EI1sccxZeDeNZZbQpLzcFInMMSYxVL4kU/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="594" data-original-width="1668" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbDgHz8m_J6nRZbLNmdBPmISRRGD7WZiylvDRAEMBpjFFlTwwKBNJOAIDEvr7kCrtNiLjcYuHCj8IeJjdz2I456hveh76Q-bk6taNzrz0g92EI1sccxZeDeNZZbQpLzcFInMMSYxVL4kU/w640-h228/image.png" width="640" /></a></div><div style="text-align: center;">Imagen 5: Restableciendo contraseña Odoo.</div><div style="text-align: center;"><br /></div><div style="text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPZnnGBbzPtAxFzqzMBNuKCasyMxgj28mrllcQzb_0ewL2Ak5hGA3F0pyoRn6XOAbjepepe6tS66j8kKsNJ3Yd6ytbx4n52a4TMzedba5adlJxgi1W5f0YGByGqkkNTx39AnxqBNYQHe4/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="853" data-original-width="1799" height="304" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPZnnGBbzPtAxFzqzMBNuKCasyMxgj28mrllcQzb_0ewL2Ak5hGA3F0pyoRn6XOAbjepepe6tS66j8kKsNJ3Yd6ytbx4n52a4TMzedba5adlJxgi1W5f0YGByGqkkNTx39AnxqBNYQHe4/w640-h304/image.png" width="640" /></a></div><br />Imagen 6 : Correo restablecer contraseña.</div><div style="text-align: center;"><br /></div><div style="text-align: justify;">Al presionar el boton change password, nos redirige a abre un enlace con una url similar a esta, http://www.dominio.net/web/reset_password?token=6S0RSXG0kQEDZliBY9G1&db=NOMBREBASEDEDATOS , con esto obtendremos el nombre de la base de datos, el cual será NOMBREBASEDEDATOS.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Con toda la información anterior, procedemos a autenticarnos en el sistema, para ello usamos el método remoto autentícate, como se muestra en la siguiente imagen. Si todo esta correcto , recibiremos un true por respuesta.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ2SKLfImWIX2fz8YJ5zZxmDjXzzNf77N1VhnWDG5xdCtj1scCYuIctyCyI-W-3tvnoQYxOEcjy1z-xGFBN5cy_ajJeGt4aswFk5nSOUK9I4I109RE67-wIhZIOF8cSMBYxSoxuQn7sRk/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="672" data-original-width="1607" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ2SKLfImWIX2fz8YJ5zZxmDjXzzNf77N1VhnWDG5xdCtj1scCYuIctyCyI-W-3tvnoQYxOEcjy1z-xGFBN5cy_ajJeGt4aswFk5nSOUK9I4I109RE67-wIhZIOF8cSMBYxSoxuQn7sRk/w640-h268/image.png" width="640" /></a></div><br /><div style="text-align: center;">Imagen 7: Autenticación correcta por medio de XMLRPC a Odoo.</div></div><div style="text-align: left;"><br /></div><div style="text-align: left;">Si ingresamos un correo o contraseña incorrecta recibiremos un false por respuesta, como se muestra en la siguiente imagen.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4_glGzI1YgowRw5QuPMoH7rL6RbaQjgPy57FK0mGaKf-WKlFCMZTkRMVXd_pME8Q86NAlFXUi5_A8xD3UMQDn9TSNermxk92JheHrahmG-uRB3PGrPY3jSrzldNHkx-spadSef1l7XvM/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="505" data-original-width="1654" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4_glGzI1YgowRw5QuPMoH7rL6RbaQjgPy57FK0mGaKf-WKlFCMZTkRMVXd_pME8Q86NAlFXUi5_A8xD3UMQDn9TSNermxk92JheHrahmG-uRB3PGrPY3jSrzldNHkx-spadSef1l7XvM/w640-h196/image.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;">Imagen 8: Autenticación incorrecta a Odoo por medio de XMLRPC.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><br /></div>Una vez llegados acá, toca empezar a validar a que tenemos acceso en el sistema y a que no tenemos acceso, además de recopilar información, con el fin de preparar un vector de ataque, que nos otorgue mas accesos a los que ya tenemos, con el fin de escalar privilegios. Lo cual estaremos abordando en la siguiente entrada.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">Saludos.</div><div style="text-align: left;">Lexer Pars.<br /><br /></div><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-i.html" target="_blank">Atacando ERP Odoo I</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-ii.html" target="_blank">Atacando ERP Odoo II</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-iii.html" target="_blank">Atacando ERP Odoo III</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-iv.html" target="_blank">Atacando ERP Odoo IV</a></p></blockquote><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-conclusion.html" target="_blank">Atacando ERP Odoo - Conclusión </a></p></blockquote></div></div></div><p></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-55514688654574027482022-01-02T06:00:00.000-08:002022-01-14T05:14:21.905-08:00Atacando ERP Odoo I<p style="text-align: justify;">Para los que no saben que es <a href="https://www.odoo.com/es_ES" target="_blank">Odoo</a>, les explico, es un ERP que utilizan muchas empresas en todo el mundo, este sistema les permite llevar el control de todas sus operaciones, contabilidad, ventas, compras, facturas, nomina, manufactura entre otros.</p><p style="text-align: justify;">Este sistema por si solo es muy robusto y seguro, sin embargo, existen muchas malas practicas al momento de implementar el sistema por parte de los consultores que realizan este proceso, puesto que la mayoría utiliza el método: siguiente, siguiente y finalizar. Dejando muchas configuraciones por defecto, tanto a nivel del sistema Odoo, así como del servidor que lo aloja.</p><p style="text-align: justify;">Adicional a esto, pueden reglas de control de acceso mal definidas, que puedan brindar información para realizar vectores de ataque. Así mismo malas practicas de programación por parte de desarrolladores, creando vulnerabilidades que pueden ser explotadas.</p><p style="text-align: justify;">Para atacar el sistema ERP, existen muchas formas, en este caso, buscaremos iniciar el ataque desde la tienda en linea, el sistema ofrece una tienda en linea integrada, permitiendo a clientes poder registrarse para realizar sus pedidos, pagar dichos pedidos y darle seguimiento a cada uno de ellos.</p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKyvI7HAXj4NsVmftnmb9H_PDozPfkHlRv37Rr2CXxIuS6uKqE2Iwt3QBRXFzkPEduNNupQp9Gywfd4Ny8O0Aami6T8NcoU32oEOQX022a5noQvFRy0d4z_qi9u0ZozX-sKBt6zCAa4fo/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="110" data-original-width="640" height="110" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKyvI7HAXj4NsVmftnmb9H_PDozPfkHlRv37Rr2CXxIuS6uKqE2Iwt3QBRXFzkPEduNNupQp9Gywfd4Ny8O0Aami6T8NcoU32oEOQX022a5noQvFRy0d4z_qi9u0ZozX-sKBt6zCAa4fo/w640-h110/image.png" width="640" /></a></div></div><br /><div style="text-align: center;">Imagen 1: Sistema ERP publicado en internet.</div><div style="text-align: center;"><br /></div><div style="text-align: justify;">Presionamos el enlace Login, y veremos que nos permite hacer un login al sistema, sin embargo adicional a esto, nos permite recuperar contraseñas y lo mas importante, Registrarnos.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg03_PbjPBvwp7b5mTZR-qaO69OmsAEM-y6y6CFNAHEX2AtWubmQ-Odre56c4YcWmztD_s_Iop2DHfviZ8cR5IF8z_IJB7RCECJCVXiyfvmfTCdY9UYTaVCEKthIRtjnBx_47BuWEUF_CQ/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="691" data-original-width="1021" height="433" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg03_PbjPBvwp7b5mTZR-qaO69OmsAEM-y6y6CFNAHEX2AtWubmQ-Odre56c4YcWmztD_s_Iop2DHfviZ8cR5IF8z_IJB7RCECJCVXiyfvmfTCdY9UYTaVCEKthIRtjnBx_47BuWEUF_CQ/w640-h433/image.png" width="640" /></a></div><br /><div style="text-align: center;">Imagen 2: Login ERP ODOO.</div><div style="text-align: center;"><br /></div><div style="text-align: left;">Nos registramos en el sistema, como se puede ver en la siguiente imagen.</div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUWNCim97Am4hIomPOHNHuVcwEpt4nIupctVVHJLAcfxrD7h1jHiVVM-LHckKMxRjpJDe-XyKQpICLljKDDnCF47KEdDsNJ7CpVh1WcqjbSUZwUTwl7pB_CgWZ9sXiSFV8OEckiT1vOXg/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="370" data-original-width="632" height="374" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUWNCim97Am4hIomPOHNHuVcwEpt4nIupctVVHJLAcfxrD7h1jHiVVM-LHckKMxRjpJDe-XyKQpICLljKDDnCF47KEdDsNJ7CpVh1WcqjbSUZwUTwl7pB_CgWZ9sXiSFV8OEckiT1vOXg/w640-h374/image.png" width="640" /></a></div></div></div><br /><div style="text-align: center;">Imagen 3: Registro en el sistema.</div></div></div><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: justify;">Una vez realizado esto, tendremos acceso al sistema, sin embargo, Odoo tiene diferentes tipos de usuarios, Usuarios internos, que son los que nos interesan, y tienen acceso a la información de clientes, ventas, compras, etc. La cuenta que creamos pertenece a un usuario de portal, el cual tiene accesos limitados.</div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0UyAOEpfqZXeh_xGwfgn75zQkC6YDZqncXjLqkAZNoiehoiKdWEa_OU4Ju1ZcSnrgobPQyoF4AlybpuzDK4Ev1NCvolXEOd2IbHLG4XGhFwAu-6lhSlF3bDhTddQqmxkLbQ0gdx4JTEs/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="308" data-original-width="646" height="306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0UyAOEpfqZXeh_xGwfgn75zQkC6YDZqncXjLqkAZNoiehoiKdWEa_OU4Ju1ZcSnrgobPQyoF4AlybpuzDK4Ev1NCvolXEOd2IbHLG4XGhFwAu-6lhSlF3bDhTddQqmxkLbQ0gdx4JTEs/w640-h306/image.png" width="640" /></a></div></div><p style="text-align: center;">Imagen 4: Login a ERP Odoo con cuenta de usuario de portal.</p><p style="text-align: center;"><br /></p><p style="text-align: left;">Todo lo anterior, es el primer paso para atacar el ERP Odoo, aun tenemos que recopilar información del sistema, aprovechando reglas de acceso mal configuradas. Esto lo veremos en la siguiente publicacion.</p><p style="text-align: left;">Saludos.</p><p style="text-align: left;">LexerPars.</p><p style="text-align: left;"><br /></p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-i.html" target="_blank">Atacando ERP Odoo I</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-ii.html" target="_blank">Atacando ERP Odoo II</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-iii.html" target="_blank">Atacando ERP Odoo III</a></p><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-iv.html" target="_blank">Atacando ERP Odoo IV</a></p></blockquote><p style="text-align: center;"><a href="https://www.guatewares.com/2022/01/atacando-erp-odoo-conclusion.html" target="_blank">Atacando ERP Odoo - Conclusión </a></p></blockquote><br /><br /><p></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-41677615376154992272022-01-01T18:00:00.000-08:002022-01-10T04:57:36.523-08:00Bienvenido 2022<p style="text-align: justify;"> Estoy muy emocionado de empezar este 2022, ya tengo fijado mis propósitos para este año y las metas a cumplir.</p><p style="text-align: justify;">Dentro de estas metas, esta retomar el tema del blog, para lo cual estaré realizando publicaciones nuevamente sobre temas de seguridad y de algún otro tipo que se me vaya ocurrió en el camino, quizá fijar algunos retos de hacking y porque no preparar un evento de hacking para este 2022 donde podamos compartir conocimiento y experiencia.</p><p>Y bueno, de momento no me resta mas que desearles un feliz año 2022, que sea de mucho hacking, hacking del bueno ;) !</p><p>Saludos,</p><p>Lexer Pars.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-24670453042394973682021-12-31T15:11:00.000-08:002021-12-31T15:11:08.794-08:00Despidiendo 2021<p>Hola, en verdad que ha pasado mucho tiempo desde que he publicado algo en el blog. </p><p>He venido a quitar todas las telas de araña que han salido por acá. Primero, para despedir este año 2021 que en verdad ha sido muy duro para todos, y deseando que cada uno de los propósitos y metas que cada uno se haya fijado, se hayan cumplido, y esperemos que este año venidero sea mucho mejor.</p><p>Feliz hacking!</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2288633302360559189.post-9879896133319457212021-01-01T09:34:00.003-08:002021-01-01T09:34:34.947-08:00Bienvenido 2021<p style="text-align: justify;">Estamos iniciando un nuevo año, donde el año viejo 2020, fue un año verdaderamente difícil de sobre llevar para muchas personas, puesto que fue un año que trajo muchas sorpresas, buenas y malas. Pero si estas leyendo esto, podes estar dichoso, pues aun tiene esperanza para continuar tus planes y metas de vida.</p><p style="text-align: justify;">Y hablando de metas. Estoy bastante feliz, pues he logrado cumplir la mayoría de metas que me fije en 2020. Quizá una meta que debo admitir me avergüenza, es no poder haber escrito en el blog, pero, espero con todas las ansias, que este 2021 esto cambie para bien y traer mas contenido como lo hacia anteriormente.</p><p style="text-align: justify;">Espero abordar mucho tanto temas de seguridad informática, pero, también, estaré abordando mucho temas empresariales, muy relacionados al sistema ERP Odoo, que es con el cual me he liado en estos años con bastante dureza. Y espero poder compartir algo de conocimiento a cada uno de ustedes que leen el blog.</p><p style="text-align: justify;">Si desean contactarme, apoyarme compartiendo contenido, todo es bienvenido, tienen la opción para poder contactarme en la pagina o pueden escribirme a informacion@guatewares.com.</p><p style="text-align: justify;">Por el día de hoy, esto será todo. No me resta mas que desearles un prospero 2021, lleno de aventuras, sorpresas y mucho pero mucho hacking en sus vidas y recuerda que si vienen tormentas en el camino, pronto veras a luz, así que animo, a empezar este año con todo!.</p><p style="text-align: justify;">Saludos.</p><p style="text-align: justify;">Lexer Pars.</p>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-2288633302360559189.post-33176133820285223792020-01-01T00:00:00.000-08:002020-01-01T00:00:04.271-08:00Bienvenido 2020Ha iniciado un nuevo año. estamos en el 2020, donde seguro habrán muchas nuevas oportunidades y fracasos que nos aportaran a su manera un crecimiento en alguna área de nuestra vida que necesitemos fortalecer.<br />
<br />
Quiero compartir con ustedes 5 de propósitos para este año 2020:<br />
<br />
<ol>
<li>Escribir una entrada al día en el blog, en la cual tratare de abordar diversos temas, como lo son seguridad informática, programación, experiencias, recomendaciones e incluso algunos temas diversos, como psicología.</li>
<li>Crear una comunidad de personas que les apasionen los temas de seguridad informática, sin bien es cierto, existen muchos grupos en la red, al menos para el país donde me encuentro, no hay un grupo que pueda consolidar a las personas del país. </li>
<li>Impartir algunas conferencias en este año, tanto de seguridad informática, como de programación.</li>
<li>Incluir mas deporte en mi vida diaria, pues hace tiempo que no me ejercito (si tu tampoco lo haces, pues, recomendación, hazlo!)</li>
<li>Cambiar mis hábitos alimenticios, hace tiempo me volví, vegano, durante 2 meses, buenos resultados, si, pero, muy duro, así que, comeré carnes y verduras y eliminare la comida chatarra.</li>
</ol>
<div>
Los otros propósitos me los guardare. Así que, bueno, hasta acá dejare esta entrada, no sin antes desearte, un año 2020 lleno de éxitos en tus proyectos y bendiciones para toda tu familia y nada, a darle con todo a los propósitos.</div>
<div>
<br /></div>
<div>
Feliz hacking 2020.</div>
<div>
<br /></div>
<div>
Saludos.</div>
<div>
Lexer Pars.</div>
Unknownnoreply@blogger.com0