Quantcast
Viewing all 236 articles
Browse latest View live

Make Faraday even better with your ideas


Your votes count!

We are excited to announce this new space where you can express what you want to see and add to Faraday. With your help, users drive our design process with your suggestions. We love hearing what you have to say and your feedback is our best resource. Improving your experience is what matters most to us.

Let's take Faraday to the max together!

You can now send your suggestions by writing to https://wantoo.io/faraday/, telling us what kind of things you are looking for. We want to know what is most important for you to gain better results and leverage your work.

Feel free to share your ideas about Faraday, advice and, even, propose changes that you think might be productive.

Your feedback plays a huge part in our design process and drives our decisions. Let us know!

Did you know that we just released Faraday v2.3? Try it & enjoy!

Black Hat Asia 2017 is coming, Singapore here we go!



Plan Your Time in Singapore.

This year we begin highly motivated and today we are happy to announce that we will introduce Faraday in Black Hat Asia, for the second time.

Black Hat is returning to Asia again in 2017 and we are preparing to be present too. This prestigious event brings the latest training, tools and advancement in theInformation Security industry.

Professionals and researchers from all around the globe will come together for four days in Singapore to present brilliant trends and investigations, enriching and nurturing this field. It will be a great opportunity for us and we are delighted to have been able to participate and share both opportunities and knowledge.

Thanks Asia for welcoming us and thanks to all of you for supporting and joining us in each new improvement. Did you know that we just releasedFaraday 2.3?

Looking forward to seeing you in Singapore! Such an amazing place to hang out!

Black Hat Asia    March 28 - 31, 2017 – Marina Bay Sands Singapore

Faraday 2.4 is ready for take off!



March is already rolling and so is our work. Today we feel so happy to share a new release, Faraday v2.4 (Community, Pro & Corp)!

Before preparing an upcoming release, we try to focus not only on improving the product but also on perfecting the user experience. We want to go beyond optimizing your everyday work, inspiring you to do more!

Faraday is the Integrated Multiuser Risk Environment you were looking for! It maps and leverages all the knowledge you generate in real time, letting you track and understand your audits. Our dashboard for CISOs and managers uncovers the impact and risk being assessed by the audit in real-time without the need for a single email. Developed with a specialized set of functionalities that helps users improve their own work, the main purpose is to re-use the available tools in the community taking advantage of them in a collaborative way! Check out the Faraday project in Github.

 

LDAP support

Yes, Faraday's bucket list is an item shorter as of thisrelease! LDAP support has been on the horizon for quite some time now, but not anymore - this brand new Corporate version comes with LDAP support out of the box, no additional modules required, isn't that neat?

 

Details are everything

And that is what this release is all about. We believe that correcting very specific details and introducing small improvements also adds quality and efficiency to a platform like ours. So it is in those items that we focused on the last iteration.

Corp changes

  • Added LDAP support for authentication 
  • Removed grouping by issue tracker option in status report

Pro & Corp changes

  • Added command line option to automatically install the license files before launching Faraday 
  • Fixed bug when editing workspaces with maximum allowed workspaces reached 
  • Improved login in WEB UI 
  • Improved password validation in change password modal in Web UI 

Image may be NSFW.
Clik here to view.
Better password validation
  • Improved UX in users list WEB UI 
  • Improved GTK UX when the client loses connection to the server 

Community, Pro and Corp changes

  • Added link to name column in Hosts list

Image may be NSFW.
Clik here to view.
Host names with links
  • Fixed bug in SQLMap plugin that made the client freeze 
  • Fixed bug when creating/updating Credentials 
  • Fixed bug in the WEB UI - menu explanation bubbles were hidden behind inputs

  • Fixed conflict resolution when the object was deleted from another client before resolving the conflict 
  • Improved fplugin 
  • Improved the installation process 
  • Improved SQLMap plugin to support --tables and --columns options 
  • Improved navigation in Web UI 
  • Merged PR #137 - CScan improvements: bug fixing, change plugin format and removed unnecessary file output 
  • Merged PR #173 - Hostnames: added hostnames to plugins 
  • Merged PR #105 - OSint: added the possibility of using a DB other than Shodan 
  • The Status Report now remembers the sorting column and order

We hope you enjoy it, and let us know if you have any questions or comments.

https://www.faradaysec.com
https://github.com/infobyte/faraday
https://twitter.com/faradaysec

https://forum.faradaysec.com/

Get Retina and Faraday together


Last year we launched the Faraday Appstore, a virtual market thought and created to offer you the main essential security tools, all together, in just one place. Today we are excited to announce a new partnership!
Starting now you'll be able to find Retina in Faraday App store


Retina Network Security Scanner is a vulnerability assessment tool developed by Beyond Trust that enables you to efficiently identify IT exposures and prioritize remediation enterprise-wide.


  • Continually monitor and improve enterprise security posture
  • Identify IT assets and sensitive data across disparate environments
  • Find security exposures in network, web, database, virtual.
  • Prioritize remediation based on real risk to critical assets
  • Easily deploy and scale from small to large environments
  • Realize optimal performance via non-intrusive scanning
Activate your Exclusive Benefits


Faraday and Retina have teamed up to offer a 10 % discount for customers who buy both products through the Faraday App store.This discount also is available for any users or companies already using one of the products and wants to start using the other.




For more information, ping us at sales@infobytesec.com and we will help you with any request.
Did you know that we just releasedFaraday 2.4?Don't miss out on what really matters 😊
See you next time!
Faraday crew


https://faradaysec.com/ideas

Infobyte at Owasp Latam Tour 2017


This week the OWASP Latam Tour is being held and we are really happy to support and sponsor this great event whose objective is to raise awareness in Latin America about the risks and challenges that we are currently facing in terms of Web Application Security.


This time it is Argentina’s turn, but the tour also includes other countries like Bolivia, Chile, Colombia, Ecuador, Guatemala, Peru, Honduras, Dominican Republic, Uruguay, Venezuela, Brazil and Mexico.


Who Should Attend the Latam Tour?


  • Application Developers / Testers and Quality Assurance
  • Application Project Management and Staff
  • Chief Information Officers, Chief Information Security Officers, Chief Technology Officers, Deputies, Associates and Staff
  • Chief Financial Officers, Auditors, and Staff Responsible for IT Security Oversight and Compliance
  • Security Managers and Staff
  • Executives, Managers, and Staff Responsible for IT Security Governance
  • IT Professionals Interesting in Improving IT Security


As a leading provider in offensive cyber security, from Infobyte we love to support and participate in OWASP Latam Tour that seeks to expand knowledge and generate interest in the community.


This Wednesday, April 19th, our COO Martin Tartarelli (@tartamar) will give a special talk about “SDLC present and future” at the Cordoba Regional University Center from 04:20 - 05:00 PM focusing on different implementations in the software development lifecycle and their impact over time . So we hope to see you there!


To get the full schedule and more information, please check out the official website https://www.owasp.org/index.php/LatamTour2017#tab=CORDOBA


Thanks to your support, this community grows and expands every day 😊🙌
Infobyte Team 👌




#OWASP #LatinAmericanTour

Faraday Arsenal BHAsia 2017 Review


Once again, Faraday cross the ocean to land in Singapore for BlackHat 2017 Arsenal. We present the latest features of Faraday 2.4 and as big surprise, this 2017 edition double from last year!

We show the tool and have great feedback, clearly Faraday start to be spreading across the globe, regardless the language, as an example the ability to produce your own CWE in 日本語 and import them into Faraday, show the real multi-user experience!

For terminal lovers, we show the power of fplugin! given you full control to use & manipulate Faraday data under a single umbrella.  

Once again, we found ourself surrounded by people questions, doubts and excitement to see new features.

This year we saw a great amount of tools, from GSM to code-scanners (and pretty much everything in between)

We do need to apologize for running out of stickers, same way Faraday grow in features, our stickers became cooler & cooler 😄

Once again, thank for listening!
Faraday crew

https://forum.faradaysec.com/https://faradaysec.com/ideas

NSA ShadowBrokers Leak: Analyzing 'EPICHERO'

On April 8th, 2017, a moderately well-known group known as ShadownBrokers released a password to decipher the file known as EQGRP-Actuion-Files that on the post on medium.com.

A few hours later the IT sec community on social media (Twitter, Reddit, etc) was busy analyzing the leak.

This article is about the reverse engineering of the exploit found in the leak and to be a bit more specific about the exploit known as EPICHERO.

  • Vulnerable Product


EPICHERO, according to the documentation found in the leak is a zero day (at the moment there isn't a public CVE that references the bug), RCE with priveleges of ROOT in Avaya call server for the version S8710-013-00.0.340.3.

'Avaya call server' is a generic name, which according to the documentation (Page 7, Paragraph 1.1) refers to its hardware Appliance, that runs the software Avaya Communication Manager.

Because of this it was impossible to try it in order to really verify that the exploit is functional and to specify all the vulnerable versions.
Beyond that, given the large scope of the leak and his source (NSA) it is posible that we're a little ahead of an exploit that is fully operational.


  • First Look

A quick look at the exploit using 'file' gives us the following information:

eh.1.1.0.0: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.2.5, not stripped

It is a ELF binary which wasn't stripped. This made it quite a bit easier to do reversing on it to maintain names of funcions and global variables!

Using 'strings, we get to two pretty interesting strings....

GCC: (GNU) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

Versions for GCC and SO used by the exploit writer.

and the most important...

TYPE=licxfer&ftp=%s&source=/var/home/ftp/pub&version=NA&licfile=;echo "

  • Functionalities

Image may be NSFW.
Clik here to view.
Exploit parameters

As you can see in the image the exploit permits:
  • Specify the name of the log file.
  • Save MAC times of the modified files
  • Indicate a script as a payload
  • Run the last one as ROOT
  • Do a scan for the version of the server.


  • Reversing the exploit
We start reversing the main function, in a principle we only see a switch for parse the parameters.

Off the bat we start to notice something in particular: a strong error check 

For each function called in the exploit you can check its return code and in the case that a error came up a call to 'cleanup' is done. This is a function that cleans all the buffers used and/or open sockets permitting a clean way to close the exploit.

Image may be NSFW.
Clik here to view.
Cleanup function

This, together with the intensive logger of each variable, shows that we are really see a professional exploit and not a simple PoC. You can really tell that someone put a lot of time into it to make it usable for pentesters beyond just the exploit writer.

We continued analyzing the main and some blocks that got our attention.

Image may be NSFW.
Clik here to view.
Private key?!

We have a certificate in PEM format and a private password!
But why is this here?
This is the information for the certificate, together with a match check between the certificate and the private password...

Image may be NSFW.
Clik here to view.
Match!
Common Name: 130.62.9.101
Organization: Avaya Inc.
Organization Unit: s8700
Country: US
Valid From: May 17, 2006
Valid To: May 9, 2036
Issuer: Avaya Call Server, Avaya Inc.
Serial Number: 5024b4b220060517120931

The certificate is signed by Avaya Inc. which corresponds to the documentation of the product which indicates that the certificates are autosigned by Avaya. Additionally, this was created for 130.62.9.101, probably one of the targets of the NSA for this exploit.

Ok, but what do we use it for? Because the certificate is autosigned by Avaya, there isn't the CA in any public chain of an operating system of your choice. As a result it's necessary to add the certificate to the chain to be able to establish a HTTPS connection that the exploit needs.

Image may be NSFW.
Clik here to view.
Add Certificate and Key

But besides adding the certificate to the chain does it add the private password to the Ctx object?
That's right... this is due to the fact that there is a function named 'client_comm' which is called one time from the main. This is responsible for creating the necessary SSL_CTX object to establish the SSL connection and check that the function of the client (likewise the server), function correctly in the exploit. Do you happen to remember the strong errors check?

One of the exploit's functions is act as a scanner to be able to check the version of the Applicance. Lets check out how you can do that...

The function  'version_scan' builds line to line a Request POST a /auth-cgi-bin/distUpgReq enviado por HTTPS, with the following parameters: -

Image may be NSFW.
Clik here to view.
version_scan

TYPE=query&ftp=[VICTIM_IP]&source=/var/home/ftp/pub&version=NA

Parse the response looking for the substrings:

version=
patch=
sid=
mid=

After it looks for a  '\n' at the end of those substrings, its starts printing in the console ( in verbose mode) the result of each substring searched .

We finally got the 'exploit' function!

In this function we found quite a surprise. There's dead code... code that doesn't execute ever as a result of the two global variables that don't have instances at any time during the exploit.

These global variables are named 'BinFile' and 'AscFile' and later on we will be able to see the results of search all the instructions that refers to them in the exploit.

Image may be NSFW.
Clik here to view.
 It doesn't set any values
Image may be NSFW.
Clik here to view.
No se setea ningun valor...

Image may be NSFW.
Clik here to view.
You can't set it using eax either...
The best theory that we came up with about this, is that the exploit writer due to lack of time refacted the sending of files and execution, forgetting about this block of code and or leaving it alone because he was never going to be able run it suceessfully.
Image may be NSFW.
Clik here to view.
Dead Basic blocks 

While, putting this aside for a second, the exploit follows this path.
  1. Create 2 random paths in /tmp/%d and another in /tftpboot/%d. Replacing  %d with a random number. 
  2.  Continuing with that there starts to appear a dead code within a if(BinFile) and if(AscFile), and as we saw, this will not never run. 

 A loop that reads each 1024 bytes of a specified payload from a file, to be coded with URL encode. 

If it is the first line read and if it asked for root priveleges for the script file:
  • It makes a command that moves everything in /tftpboot/%numero_aleatorio (a backup) to /opt/ws/%nombre_original/webupgrade (It's original site) and eliminates this backup.
  • It concates to a buffer, the command of the payload read and after the command from the previous bridge
 If it isn't the first line read:
  1. We copied this line of the payload to the buffer.

When this buffer is full (> 724 ) in this latter iteration of the loop.
  • It makes use of snd_n_append sending the saved command in the previous buffer and it saves everything in the first random path in /tmp, which we will call path_random1.

This occurs in an infinite loop until it finishes reading the payload script of the user. Here is when everything happens...
  1. If there was a pending command about to send, it is sent using snd_n_append.
  2. If a command is made that erases the two random paths created (path_random1 and path_random2) and this is written in path_random1.
  3. In path_random2 it writes a command that runs the  path_random1 redirecting the streams to a /dev/null.
  4. If the user asked for Root priveleges:
    1. It saves the MAC of all the files and directories in /opt. Additionally, it changes it's MAC to that of the instant.
    2. The same with tftpboot/
    3. The same goes for /opt/ws/
    4. It makes a link of each file and directory of /opt/ws/*/webupgrade (except the links) to the tftpboot path
    5.  It runs sudo /opt/ws/webinstall modifyFileEntry /opt/ws/webupgrade ".""/opt/ws/functions | . %path_random2  | exit 
    6. It runs: sudo /opt/ws/webupgrade
  5. If the user didn't ask for Root: It runs directly the %path_random2
  6.  If the user proportions the archives whose MAC wants to change, the exploit sets the MAC to real-time for each file. 
 Great... Now we have the execution of the code and all the functionalities of the exploit pretty reasonably explained. 
 A simple way for the %path_random2 file to end up running %path_random1 (which contains the payload of the user). Additionally, the necessary commands are run in order to change the MAC for archives and directories like as was done for commands to gain ROOT priveleges.
This is possible using 'sudo', because the user that runs the vulnerable code has access for the 'sudo' use. This is a bad security practice for users that run services such as HTTP servers. 
For the binaries run in /opt/ws, due to not have access to the software and on the internet there is documentation for them we can't specify anyting. 

Great!!!... we already have everything, but which one is the vulnerability?!

The vulnerability is exploited in the bld_n_snd_http function. Look for yourselves...

Image may be NSFW.
Clik here to view.
Parametro licfile
'aTypeLicxFerF_7' is the string format that creates the POST parameters which are sent in the Request POST via HTTPS to a CGI in /auth-cgi-bin/distUpgReq.

Ven ese ';echo' en el parametro licfile? Es claramente una Shell Injection, ese CGI esta concatenando el parametro en un comando que luego es ejecutado en una Shell, asi es como la NSA logro ejecucion de codigo. Can you see that ;echo in the licfile parameter? This is clearly a Shell Injection that CGI is concating the patameter in the command that afterwards is run in a shell. This is the way the NSA achieved this execution of the code. 
The function snd_n_append mentioned earlier, that wrote a file in the remote system is simply a Wrapper if this last function.
It reads the sent files by parameters and after it calls bld_n_snd_http passing as a parameter a string with POST parameters of this CGI.

To wrap things up, I would like to mention that there is a script in the leak /Linux/bin/epichero/cleanup.script which does an inspection for the logs of apache and erases any trace of the exploit in a pretty detailed way. On top of this, it restores the backups of the directory /opt/ws and eliminates the file /var/iglut/upg_status.dat

Lastly, an interesting piece of information in the same directory of this script is the reverse shell used by NSA and that contains the address IPv4 206.210.129.25 (Amphitheater Public Schools).
It could be possible that this is one of the servers hackecd by NSA to hide traces of its Shells and exploits.

  • Conclusion: 

EPICHERO is a RCE (zero-day) with ROOT priveleges in Avaya Communication Manager. The vulnerability resides in the CGI /auth-cgi-bin/distUpgReq whose POST licfile parameter is vulnerable to Shell Injections. 

The exploit is developing a serious errors check. Features against forensic analysis such as changing the MAC of the archives and directories in addition to a strong log of each action done by the exploit. All of this shows the huge amoung of effort dedicated to creating the most effective and ''sneaky'' exploit possible to avoid tipping off any alerts as was done in the obtention and utilization of violated servers previously to use receivers of its Reverse Shells.

Credits
Author: Ezequiel Tavella - Infobyte Security Research Lab.
Contributions: Josh Mador Infobyte Security

NSA ShadowBrokers Leak: analisis de EPICHERO.

El dia 8 de abril de 2017 el conocido grupo denominado ShadowBrokers libero la password para descifrar el archivo conocido como EQGRP-Auction-Files a traves de este post en medium.com.

Horas despues la comunidad de seguridad informatica estaba analizando en las redes sociales mas usadas como Twitter y Reedit el contenido de este leak.

Este articulo trata sobre el reversing realizado al exploit encontrado en este leak, mas especificamente sobre el exploit denominado EPICHERO.

EPICHERO es un RCE (zero-day) con privilegios de ROOT en Avaya Communication Manager, la vulnerabilidad reside en el CGI /auth-cgi-bin/distUpgReq cuyo parametro POST licfile es vulnerable a Command injection.

  • Producto vulnerable

EPICHERO, segun la documentacion encontrada en el leak, es un zero day (No hay un CVE publico que referencie el bug) RCE con privilegios de ROOT en Avaya call server para la version S8710-013-00.0.340.3.

'Avaya call server' es un nombre generico, segun la documentacion (Pagina 7, Parrafo 1.1), para referirse a sus hardware Appliance, que corren el software Avaya Communication Manager.
Debido a esto, nos fue imposible verificar realmente que el exploit sea funcional y especificar todas las versiones vulnerables.

El impacto de la vulnerabilidad mas alla de ser una ejecucion de codigo es mas que notable, el servidor S8710 es un servidor comercial para enrutar voz, data y video.
Debido a esto, comprometiendo este servidor podrias sniffear el trafico enrutado y como consecuencia, grabar llamadas SIP, redirigirlas o explotar cualquier tecnica conocida contra un servidor SIP.

Mas alla de esto, dado la envergadura del leak y su victima (NSA) es muy posible que estemos ante un exploit realmente operacional.

  • Primer vistazo

Un vistazo rapido del exploit utilizando 'file' nos arroja la siguiente informacion:

eh.1.1.0.0: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.2.5, not stripped

Es un binario ELF el cual no fue stripped, lo cual nos facilito bastante el reversing del mismo al mantener nombres de funciones y variables globales!

Utilizando 'strings', llegamos a dos strings bastantes interesantes... 

GCC: (GNU) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

Version de GCC y SO utilizado por el exploit writer.

y lo mas importante...

TYPE=licxfer&ftp=%s&source=/var/home/ftp/pub&version=NA&licfile=;echo "

  • Funcionalidades

Image may be NSFW.
Clik here to view.
Parametros del exploit

Como se puede ver en la imagen el exploit permite:
  • Especificar el nombre del log file.
  • Salvar el tiempo MAC de los archivos modificados por el mismo.
  • Indicar un script como payload.
  • Correr este ultimo como Root.
  • Realizar un escaneo de version del servidor.


  • Reversing del exploit
Comenzamos reverseando la funcion main, en un principio solo vemos un switch encargado del parseo de los parametros.

Rapidamente podemos notar algo particular: un fuerte chequeo de errores.

Por cada funcion llamada en el exploit se comprueba su codigo de retorno y en caso de que haya surgido un error se realiza la llamada a 'cleanup', una funcion que limpia todos los buffers utilizados hasta el momento y/o sockets abiertos permitiendo cerrar el exploit de manera limpia.

Image may be NSFW.
Clik here to view.
Funcion cleanup

Esto, junto con el log intensivo de cada variable, demuestra que estamos ante un exploit profesional y no una simple PoC, en donde se puso mucho esfuerzo para que sea utilizable por pentesters mas alla del exploit writer.

Continuamos analizando el main y unos bloques nos llaman la atencion

Image may be NSFW.
Clik here to view.
Key privada?!

Tenemos un certificado en formato PEM y su clave privada!
Pero por que esta esto aqui?
Esta es la informacion del certificado, junto con una comprobacion de matcheo entre certificado y clave privada...

Image may be NSFW.
Clik here to view.
Match!
Common Name: 130.62.9.101
Organization: Avaya Inc.
Organization Unit: s8700
Country: US
Valid From: May 17, 2006
Valid To: May 9, 2036
Issuer: Avaya Call Server, Avaya Inc.
Serial Number: 5024b4b220060517120931

El certificado esta firmado por Avaya Inc, lo que corresponde con la documentacion del producto el cual indica que los certificados son autofirmados por Avaya.
Ademas de esto fue creado para 130.62.9.101, probablemente uno de los targets de la NSA para este exploit.

Ok, pero para que se utiliza? Como esta autofirmado el certificado por Avaya, no esta la CA en ningun chain publico de cualquier sistema operativo.
Debido a esto es necesario agregar el certificado al chain para poder establecer una conexion HTTPS que el exploit necesita.

Image may be NSFW.
Clik here to view.
Agrega Certificado y Key

Pero ademas de agregar el certificado al chain agrega la clave privada al objecto Ctx?
Si correcto, esto es debido a que tienen una funcion llamada 'client_comm' la cual es llamada una unica vez desde el main, esta se encarga de crear el objeto SSL_CTX necesario para establecer la conexion SSL y chequear que la funcion de cliente, asi como tambien de servidor, funcionen correctamente en el exploit. Recuerdan el fuerte chequeo de errores?

Una de las funcionalidades del exploit es actuar como escaner para poder comprobar la version del Appliance, asi que vamos a ver como lo hace...

La funcion 'version_scan' arma linea a linea un Request POST a /auth-cgi-bin/distUpgReq enviado por HTTPS, con los siguientes parametros:

Image may be NSFW.
Clik here to view.
version_scan

TYPE=query&ftp=[VICTIM_IP]&source=/var/home/ftp/pub&version=NA

Parsea la respuesta en busca de los substrings:

version=
patch=
sid=
mid=

Y luego busca un '\n' al final de esos substrings, a medida que va printeando en la consola (En modo verbose) el resultado de cada variable buscada.

Finalmente llegamos a la funcion 'exploit'!

En esta funcion nos encontramos con una sorpresa, hay codigo muerto, codigo que no se ejecuta nunca debido a que dos variables globales no son instanciadas en ningun momento del exploit.

Estas variables globales en cuestion se llaman 'BinFile' y 'AscFile', a continuacion pueden ver los resultados de buscar todas las instrucciones que se refieran a ellas en el exploit.

Image may be NSFW.
Clik here to view.
No se setea ningun valor...
Image may be NSFW.
Clik here to view.
No se setea ningun valor...

Image may be NSFW.
Clik here to view.
Tampoco se setea utilizando eax...
La mejor teoria que podemos tener acerca de esto, es que el exploit writer por una cuestion de tiempo refactoreo el envio de files y ejecucion, olvidandose de este bloque de codigo y/o dejandolo ya que nunca iba a ejecutarse.
Image may be NSFW.
Clik here to view.
Basic blocks muertos

Bien, dejando esto de una lado esto, el exploit sigue este camino.
  1. Crea 2 paths aleatorios en /tmp/%d y otro en /tftpboot/%d. Reemplazando %d por un numero aleatorio.
  2. A continuacion aparece todo el codigo muerto dentro de un if(BinFile) y if(AscFile), como vimos esto no se ejecuta nunca.

Un loop que va leyendo cada 1024 bytes el payload especificado desde un file, para ser encodeado con URL encode.

Si es la primera linea leida y si se pidio privilegios de root para el script file:
  • Se construye un comando que mueve todo en /tftpboot/%numero_aleatorio (Un backup) a /opt/ws/%nombre_original/webupgrade (Su sitio original) y elimina este backup.
  • Se concatena a un buffer, el comando del payload leido y luego el del punto anterior.
Si no es la primera linea leida:
  1. Copiamos esta linea del payload a un buffer.
Cuando este buffer se llena (> 724 ) en un iteracion posterior del loop.
  • Se hace uso de snd_n_append enviando el comando guardado en el buffer anterior y guarda todo en el primer path aleatorio en /tmp, lo llamaremos path_random1.

Esto ocurre en un loop infinito hasta que se termina de leer el script payload del usuario, aca es cuando ocurre todo...
  1. Si quedo algun comando pendiente por enviar, se envia usando snd_n_append.
  2. Se construye un comando que borra los dos paths aleatorios creados (path_random1 y path_random2) y este se escribe en path_random1.
  3. En path_random2 se escribe un comando que ejecuta el path_random1 redireccionando los streams a /dev/null.
  4. Si el usuario pidio privilegios de Root:
    1. Se salva los MAC de todos los files y directorios en /opt, ademas se cambian su MAC al de ese instante.
    2. Lo mismo con /tftpboot/
    3. Lo mismo con /opt/ws/
    4. Hace un enlace de cada archivo y directorio de /opt/ws/*/webupgrade (Menos los enlace) al path de tftpboot.
    5. Se ejecuta: sudo /opt/ws/webinstall modifyFileEntry /opt/ws/webupgrade "." /opt/ws/functions | . %path_random2  | exit
    6. Se ejecuta: sudo /opt/ws/webupgrade
  5. Si el usuario no pidio Root: Ejecuto directamente el %path_random2
  6. Si el usuario proporciona los archivos cuyas MAC quiere cambiar el exploit setea la MAC, al tiempo actual, a cada archivo. 
Perfecto aca tenemos ejecucion de codigo y todas las funcionalidades del exploit explicadas.
De manera simplificada el archivo %path_random2 termina ejecutando %path_random1 que contiene el payload del usuario, ademas se ejecutan los comandos necesarios para cambiar el MAC de los archivos y directorios asi como tambien los comandos para ganar privilegios de ROOT.
Esto ultimo es posible usando 'sudo', por que lo estimamos que el usuario que corre el codigo vulnerable tiene acceso a el uso de 'sudo', una mala practica de seguridad para usuarios que corren servicios como servidores HTTP.
En cuanto a los binarios ejecutados en /opt/ws, debido a que no tenemos acceso al software y en internet no hay documentacion acerca de ellos no podemos especificar nada.

Ok perfecto ya tenemos todo, pero cual es la vulnerabilidad?!

La vulnerabilidad es explotada en la funcion bld_n_snd_http, veanlo por ustedes mismos...

Image may be NSFW.
Clik here to view.
Parametro licfile
'aTypeLicxFerF_7' es el format string que crea los parametros POST enviados en un Request POST via HTTPS, a un CGI en /auth-cgi-bin/distUpgReq.

Ven ese ';echo' en el parametro licfile? Es claramente un Command Injection, ese CGI esta concatenando el parametro en un comando que luego es ejecutado en una Shell, asi es como la NSA logro ejecucion de codigo.

La funcion snd_n_append mencionada anteriormente, que escribia un file en el sistema remoto, es simplemente un Wrapper de esta ultima funcion.
Lee el archivo enviado por parametro y luego llama a bld_n_snd_http pasandole como parametro un string con los parametros POST de este CGI.

Para finalizar me gustaria mencionar que hay un script en el leak /Linux/bin/epichero/cleanup.script el cual realiza una inspeccion de los logs de apache y borra cualquier rastro del exploit de manera detallada.
Ademas de esto, restaura los backups del directorio /opt/ws y elimina el archivo /var/iglut/upg_status.dat

Por ultimo un dato interesante en el mismo directorio de este script, esta la reverse shell utilizada por la NSA y que contiene una direccion IPv4 206.210.129.25 (Amphitheater Public Schools).
Posiblemente este sea uno de los servidores hackeados por la NSA para esconder los rastros de sus Shells y exploits.

  • Conclusion: 

El exploit esta desarrollado con un fuerte chequeo de errores, features contra analisis forense como cambiar el MAC de los archivos y directorios, ademas de un fuerte log de cada accion realizada por el exploit.
Todo esto demuestra grandes esfuerzos dedicados en crear un exploit lo mas eficaz posible y sigiloso para evitar cualquier tipo de alerta, asi como tambien en la obtencion y utilizacion de servidores vulnerados anteriormente para utilizarlos como receivers de sus Reverse Shells.

Creditos
Ezequiel Tavella - Infobyte Security Research Lab.

Viajamos a Charruacon Security Conference 2017




Esta comunidad es cada día más grande y se sigue extendiendo alrededor del mundo. Este año, una nueva conferencia abre sus puertas en Montevideo - Uruguay y, desde Infobyte, vamos a estar allí apoyando y participando.



¿Por qué no podés perderte Charruacon 2017?


  • ·         Encontrarás speakers invitados de primer nivel
  • ·         Se abordarán temas de seguridad con mucho foco en las técnicas más modernas de hacking.
  • ·         Dos paneles de debate: Hackers vs CISOs y Hackers vs Abogados 
  • ·         ¡Capture the Flag con premios!
  • ·         La entrada no tiene costo (Solo tenés que registrarte 😊)

“Se busca generar conciencia sobre temas de seguridad y acercar la filosofía hacker whitehat a las organizaciones, fomentar el reporte de vulnerabilidades responsable y generar un ambiente colaborativo en búsqueda de la mejora de seguridad a nivel nacional”.

¿Dónde y cuándo?

11 y 12 de mayo en el auditorio principal de la Torre de las Comnunicaciones ANTEL (Guatemala 1075, Montevideo)

Para más info podés visitar la Web oficialCharrua.orgo escribir directamente a  info@charrua.org. También, podés seguirlos en Twitter @CharruaCon.

¿Nos vemos en Uruguay? Esperamos que sí 😊🙌

Infobyte Team👌






Traveling to Charruacon Sec Conference 2017


This community is getting bigger and bigger every day and continues to spread around the globe. Today, a new conference starts in Montevideo - Uruguay and, from Infobyte, we’ll be there supporting and participating.

Why you shouldn’t miss Charruacon 2017…

· You will find first-class guest speakers
· Security issues will be addressed with a lot of focus on the most trending hacking techniques.
· Two panels of debate: Hackers vs CISOs and Hackers vs Lawyers
· Capture the Flag with prizes!
· The entry is for free ( Register only 😊)

"It seeks to raise awareness about security issues and bring the whitehat hacker philosophy to organizations, promote responsible vulnerability reporting and generate a collaborative environment in search of security improvement at the national level."


Where and when?
11 and 12 May in the main auditorium of the Tower of Communications ANTEL (Guatemala 1075, Montevideo)


For full info you can visit the official Website Charrua.orgor write directly to info@charrua.organd you can also follow them on Twitter@CharruaCon.


See you in Uruguay? We hope so 😊 🙌
Infobyte Team

Recomendaciones de No More Ransom! y decryption para Wannacry


¿Cómo prevenir un ataque de ransomware?

  1. Hacer copias de seguridad de tus archivos. Es recomendable tener algún sistema de recuperación de información disponible y configurado para que una infección de ransomware no te tome por sorpresa y destruya toda tu información personal permanentemente. Lo mejor es crear dos copias: una guardada en la nube (usando un servicio que haga backup automático de tus archivos) y una física (disco portátil, pendrive, en otra computadora, etc.). Es importante desconectarlos de la computadora de origen cuando termine el proceso. Tus copias tambien son utiles en caso de que borres por accidente un archivo crítico o experimentes problemas con tu disco duro.

  2. Usar un antivirus robusto para proteger tu sistema. No apagues las “funciones de heurística”, ya que estas ayudan al software a tomar muestras de ransomware que aún no han sido formalmente detectados. 

  3. Mantener todos los programas y el sistema operativo en tu computadora actualizados a su última versión.  Si hay opción para que se actualicen automáticamente, habilitala. 

  4. No confíes en nadie. Literalmente. Cualquier cuenta puede quedar comprometida, y los links maliciosos pueden ser enviados desde la cuenta de tus amigos en redes sociales, compañeros de trabajo o incluso de juegos online. Nunca abras adjuntos en mails de alguien que no conozcas. Los cibercriminales normalmente distribuyen mails falsos que son muy parecidos a los enviados por tiendas online, bancos, organizaciones gubernamentales, la policía o hasta agencias de impuestos, engañando a quienes los reciben para que clickeen un link malicioso, instalando así el malware en su sistema. 

  5. Habilitar la opción de “mostrar extensiones de archivo” en la configuración de Windows. Esto hace mucho más fácil identificar posibles archivos maliciosos. Especial cuidado con archivos con extensiones “.exe”, “.vbs” y “.scr”. Cibercriminales o estafadores pueden usar varias extensiones para disfrazar un archivo malicioso haciendo que parezca, por ejemplo, un video, una foto o un documento (al estilo hot-chics.avi.exe o documento.scr). 

  6. Si descubrís un proceso desconocido en tu máquina, desconectala inmediatamente de internet u otras redes (por ejemplo, el Wi-Fi de tu casa) para evitar que la infección se esparza.

Consejos de prevención adicionales para WannaCry
Para prevenir que WannaCry se esparza por tu red:

  • Deshabilitar smb v1. Más información en este link.
  • Instalar los parches de Microsoft. Más información al respecto en este link.

Se recomienda generalmente que no pagues el rescate de tus archivos. Lo único que logramos pagandole a los cibercriminales es demostrarles que el ransomware funciona. Además, no hay garantía alguna de que recibas la clave para desencriptar tus archivos.




(En las ultimas horas salió a la luz una herramienta para obtener la key para la recuperación de archivos (solo para Windows XP, por el momento). Para que funcione, el equipo tiene que no haber sido reiniciado después de la infección, pueden bajarlo en: https://github.com/aguinet/wannakey)

Fuzzbunch, pensar titulo

En los últimos días se puso "hot topic" el tema de EternalBlue debido al éxito del ciberataque conocido como WannaCry. El ataque se esparció usando el toolset de la NSA que libero el team Shadow Brokers el pasado viernes santo.

El presente articulo tiene como fin dar a conocer diferentes aproximaciones para poder analizar el funcionamiento de este framework, como también dar a conocer una vulnerabilidad de bajo impacto localizada en el framework

Ah grandes rasgos, tratamos de usar diferentes herramientas de depuración para tracear la ejecución y analizar zonas importantes en el codigo.

DEBUGGEANDO EL LAUNCHER

Fuzzbunch es el mini framework escrito en python encargado de lanzar los diferentes tipos de módulos binarios, como por ejemplo payloads como DoublePulsar o exploits como EternalBlue.

Para Fuzzbunch usaremos el modulo pdb que nos permitirá levantar una consola interactiva en la cual podemos consultar estado de variables y/o modificarlas, la linea en cuestión es:

import pdb;pdb.set_trace()

cuando llegue a ejecutar esa linea, levantara la consola interactiva de Pdb, los comandos mas usados son:

  •  list, que muestra en que linea de código estamos posicionados.
  • next y step para ejecutar la linea donde estamos con la diferencia que next se detiene en la siguiente linea, en cambio step pasa la ejecución a la función mas interna.
  • continue, para seguir con la ejecución normalmente.
también podemos meter código python para inspeccionar las variables. Como ejemplo en la siguiente imagen se interrumpió el flujo normal en el "main" de fuzzbunch:



las variables marcadas en color amarillo corresponden a diferentes directorios del propio fuzzbunch, el método setup_and_run creara una instancia del objeto FuzzBunch que es un objeto heredado de Cmdusado para crear consolas interactivas al estilo gdb o metasploit.

Mirando el constructor podemos advertir que se usa un archivo de configuración xml para cargar el entorno inicial:


un poco mas abajo evalua uno de los campos del archivo xml para guardar un valor booleano:

por defecto trae el valor True, entonces cuando hace la evaluación deja habilitada la variable enablecolor. En vez de un valor true/false se podría inyectar código python para que nos entregue una reverse shell

al ejecutar el framework, se evaluara la anterior linea y entregara una consola con los mismos privilegios del atacante que esta ejecutando los módulos:


Es particularmente raro que  se use eval de un archivo de configuración para setear variables, parece que al momento de construir este código, se tuvo en cuenta la facilidad de desarrollo sin hacer mucho hincapié en la seguridad

Eso es alentador si lo que pretendemos es buscar errores en estas herramientas.


DEBUGGEANDO EL MODULO

Los módulos son ejecutables compilados que los ejecuta el launcher con subprocess.Popen luego de configurar algunos archivos, en la siguiente imagen podemos ver el comando en cuestión:


fuzzbunch lanza el binario y espera un maximo de cuarenta y cinco segundos a que el binario establezca una comunicación por un IPC que creo el, en caso de alcanzar el Timeout el framework saca por pantalla un mensaje de error en el canal IPC



CONNECT_TIMEOUT_SECS esta definida unas lineas mas arriba

para analizarlo modificamos el binario con un loop en el EntryPoint e incrementamos los segundos del Timeout a un valor que nos permita analizarlo con todo el entorno levantado

el EntryPoint lo pisamos con un bucle infinito, que nos posibilitara dormir el proceso y que nos espere a Attachearnos


ahora solo falta lanzar el modulo, attach el proceso con un debugger como OllyDBG o x32dbg y restauramos los bytes originales del proceso

Tengan en cuenta que fuzzbunch lanza dos veces el proceso, el primero para verificar que todo funcione correctamente con el parámetro --ValidateOnly y el segundo ejecuta el exploit

Si el objetivo es caer en zonas cruciales del programa, como el estado del backdoor o el envió del exploit, podemos frenar la ejecución en TcLog que es una función que maneja todos los textos que se imprimen por pantalla

También podemos mirar en send y recv ya que hace uso de esas funciones para enviar los paquetes


los tips expuestos anteriormente deberían funcionar para cualquier modulo de los que posee el framework.

PING AL BACKDOOR

Una de las verificaciones que hace el modulo antes de triggerear la vulnerabilidad es ver si la maquina ya fue comprometida, para hacer eso envía un paquete SMB y en base a la respuesta reconoce si esta o no infectado, también permite enviar el status del backdoor DoublePulsar


esta información viene dentro de uno de los paquetes que se envían, el campo importante es el 51h que estamos marcando en la imagen



las posibilidades están enumeradas en el próximo switch:



las opciones son:
  • 00h significa que la maquina no esta comprometida aun.
  • 51h es que el agente ya esta instalado y operativo.
  • 61h 71h 81h y 91h son mensajes de estado, como por ejemplo "Bad transaction" o "Invalid transcantion Param"

Cabe destacar que ya existen módulos en diferentes herramientas como nmap o metasploit para chequear si una maquina ya fue comprometida.

CREDITOS

Javier Aguinaga, German Riera y Ezequiel Tabelli

A Brand New Faraday Is Up And Running!




You heard it here, first. Faraday v2.5 (Community, Pro & Corp) is out!

Faraday is the Integrated Multiuser Risk Environment you were looking for! It maps and leverages all the knowledge you generate in real time, letting you track and understand your audits. Our dashboard for CISOs and managers uncovers the impact and risk being assessed by the audit in real-time without the need for a single email. Developed with a specialized set of functionalities that helps users improve their own work, the main purpose is to re-use the available tools in the community taking advantage of them in a collaborative way! Check out the Faraday project in Github.


Data Analysis tools

Since Faraday allows you to keep all of your pentests in one place, we thought it would be interesting to add the possibility to see your assessments come to life, so we added new data analysis reports to the Web UI:
 

  • Tools findings by severity and targets 
  • Vulnerability severity cluster
  •  Severity timeline
  •  Service vulnerability timeline
  •  Target severity pie charts
  •  OS severity pie charts
  •  Severity by tool boxplot
  •  Total vulnerability correlation with price by each OS
  •  Vulnerability by type chart, ease of resolution and OS
  •  Vulnerability by year tree
These charts allow you to find new relations between your data and clarify the state of an assessment.
We will also add new charts in the future, and the possibility to customize them as well!
As an example, this is how some of the current reports look


Image may be NSFW.
Clik here to view.
pie_target.png
Target severity
Image may be NSFW.
Clik here to view.
boxplot_price.png
Vuln severity price vs creator
Image may be NSFW.
Clik here to view.
imdemo_vulnerability_severity_cluster.png
Target severity cluster map
Image may be NSFW.
Clik here to view.
tools_finding.png
Tools findings by severity and targets alluvial chart
You can also download the charts as PNG or SVG format to include them in your custom reports.
Image may be NSFW.
Clik here to view.
Screen Shot 2017-05-12 at 6.25.26 PM.png
Download charts as PNG


Credentials CRUD

One of the big goals in every internal pentest is gathering service credentials to log in to a host, escalate privileges and pivot. Wouldn't it be great if you could store all your credentials in one place? Now you can! Save all the found creds in Faraday's DB, query it using the Faraday Plugin and feed other tools to keep hacking!

Vuln templates CRUD

Manually creating vulnerabilities has always been a nuisance, from getting evidence to wording the descriptions - no one likes it. And also, explanations vary between testers, so what sounds perfectly understandable to one person can be gibberish to another.

Knowing this is a continuous issue when reporting, we added the Vulnerability Templates Database in version 1.0.12. We knew back then that editing a CSV and uploading it every time a change was needed wasn't the best approach, but other features came first when prioritizing.

An improvement on this feature was long overdue so we created a brand new view in the Web UI just to manage these templates. You can now upload a CSV file from the Web UI and then edit the templates as desired.

Image may be NSFW.
Clik here to view.
Vuln templates view


But wait! The plot thickens! You can also create a template from an existing vulnerability!

Write your vulns once, and use them forever.

Hosts revamp

When users wanted to edit or create hosts in previous Faraday versions, the only options was through a modal dialog. This was especially annoying in small screens, when scrolling and cluttered information became a hassle.
Image may be NSFW.
Clik here to view.
editbefore.png
Deprecated modal view
Keeping in mind that managing hosts is a very important task to pentesters and managers alike we decided to update the hosts manager. As of this version you can examine, create and edit hosts from the same full view. Since it is no longer a modal dialog, the whole browser window is used, allowing to have all of the host details, along with its services in plain sight. No more scrolling, no more three clicks to get the host info!
Image may be NSFW.
Clik here to view.
detail.png
Improved host view
Image may be NSFW.
Clik here to view.
new.png
Host creation view
Image may be NSFW.
Clik here to view.
edit2.png
Host edition view

Plugins Core Improvements

Faraday's Plugin System is a core piece of the platform and that is why we constantly work on adding new tools and improving the ones we already support.
In this iteration we improved the system itself so that plugins can access the error console and communicate with the user in a simplified manner.
Image may be NSFW.
Clik here to view.
log.png
Plugin output

On the maintenance side, we fixed a bug in the Nessus plugin which locked the vuln edition after processing and added support for SQLmap's -r argument that allows adding an HTTP request file instead of manually loading the URL and headers. We also modified a few other plugins (Core Impact, Netsparker, Nikto, Propecia, Qualysguard, SQLmap, Telnet and Wapiti) to improve the content of the vulnerabilities that are added to the platform, creating better Executive Reports.
 

Misc

It's not uncommon for our users to switch between versions (for example, when upgrading from Community to Pro) and some issues arose in that process. Keeping that use case in mind,we improved how the Faraday Client verifies its version against the Server to avoid further issues in the future.

Also, we did some improvements in GTK's link to the Web UI and corrected a bug that prevented the Web UI from saving changes to workspaces created using the GTK Client.

Some of our Pro and Corp users had troubles starting the Server with no internet connection. We changed its behavior when bootstrapping without an active internet access, allowing users to run it even with limited connectivity.

Regarding the Executive Report, we fixed a minor bug that generated inconsistent reports when grouping regular vulns with web vulns.
Image may be NSFW.
Clik here to view.
report.png
Target, website, param name and path are grouped correctly
 With the new additions to the Web UI, the left navigation bar was overloaded so we removed the administrative links (Workspaces, Users and Licenses) and added them to a new admin menu on the top right, along with a link to the Help page and an about dialog.
Image may be NSFW.
Clik here to view.
About Faraday

A special config for our Corp Customers


Because of a refactor in the auth system made in the last Corporate Version Release we need to ask the users to setup CouchDB correctly to avoid constantly losing the session.

To avoid headaches, follow this step-by-step guide:
  1. Turn off Faraday Server (./faraday-server.pyc --stop)
  2. Turn off CouchDB (systemctl stop couchdb)
  3. Modify the file “local.ini” usually located in the path /etc/couch/local.ini
  4. Add the following lines to the [couch_httpd_auth] part of that file
    allow_persistent_cookies = true
    timeout = 9999999
  5. Initialize CouchDB and Faraday Server again and you are all set

Changes and fixes

Corp changes

    • Added a Data Analysis component to the Web UI

      Pro & Corp changes

      • Fixed a bug in the GTK interface when trying to configure an non-existent URL 
      • Always redirect to login page when user is not logged in 
      • Prevent users with role client to login using GTK 
      • Disable host and vuln edit buttons when logged in as client 
      • Fixed the server, which was refusing some valid licenses 
      • Improved grouping in Executive Reports 
      • Redirect to home page when a logged user visits login page

      Community, Pro & Corp changes

      • Fixed bug when editing workspaces created in GTK 
      • Improved host search in the WEB UI 
      • Extended the config to support different searching engines in the WEB UI 
      • Check that client and server versions match when connecting 
      • Adds the 'v' and 'version' argument for both the server and the client 
      • Fixed "refresh" button in the Web UI 
      • Fix API on /ws/<workspace> with duration object None 
      • Added a CRUD for Credentials to the Web UI 
      • Bug fixes on the Burp Online Plugin 
      • Added a script to connect with Reposify 
      • Fixed Hostname import in Nessus Plugin 
      • Make plugin methods log() and devlog() work again 
      • Fixed bug in SQLMap plugin that made the client freeze 
      • Improved SQLMap plugin to support more options and to show errors in GTK log console 
      • Fixed bug when creating/updating Credentials 
      • Improve plugins usage of vulnweb URL fields 
      • Fixed order of Report Plugins in the GTK import list

      We hope you enjoy it, and let us know if you have any questions or comments.

      https://www.faradaysec.com
      https://github.com/infobyte/faraday
      https://twitter.com/faradaysec

      https://forum.faradaysec.com/

      https://www.faradaysec.com/ideas

      Upcoming Webinar: Taking Faraday v2.5 to the max


      A few days ago, we released Faraday v2.5 and we are very happy with how it’s turned out.We hope you’re enjoying it as well 😄! We believe that each new version means improvements and benefits for your work and growth for us, that's why we dedicate a lot of energy and effort to them.
      A new webinar to learn and share together
      We want to invite you to our next webinar where we'll be sharing and reviewing this new version of Faraday, making a tour of the platform, answering your doubts and sharing the advances and news.
      Where and when?
      The meeting is on Wednesday, June 14th at 3PM (EST) and you can join in by clicking on  http://youtu.be/HIcU8o8ywoY (Our official YouTube channel).

      Hunting the hunter, finding bugs in NSA tools

      A couple of weeks ago a ''hot topic'' was going around the IT security community has been about EternalBlue. This was due to the resounding success (I guess it depends on your definition) of the WannaCry ransonware. The attack spread using the NSA toolset that Team Shadow Brokers unleashed in mid-April

      In this article we are going to try to analyse the functionality of this framework (fuzzbunch) and we're going to look at a little vulnerability inside the framework.

      We are going to use a couple different debugging tools in order to trace the execution and analyse it's important parts in the code itself.

      Debugging the Launcher

      Fuzzbunch is the mini-framework written in python, Basically, this framework launches different types of binary modules. Examples include payloads such as DoublePulsar or exploits such as EternalBlue.

      For Fuzzbunch, we will use the pdb module that will let us get an interactive console up and running. With this we will be able to consult the state of the variables and/or modify them. The line for that is:

      import pdb;pdb.set_trace()

      when the line is finally executed, the Pdb interactive console will start running. Some of the most used commands are:

      • list: shows in which line of code we are currently executing
      • next and step: to run the line we are on with the difference being that next stops on the following line.  step stops inside a called function.
      • continue: to continue the execution normally 
      We can also put in python code to inspect the variable. An example (image below) is the normal flow was interrupted in the "main" of fuzzbunch:



      The variables marked in yellow correspond to different directories in fuzzbunch. The method, setup_and_run creates an instance of the object FuzzBunch that is an object inherited from Cmd used to create interactives consoles (similar in style to gdb or metasploit)

      Looking at the builder we can see that a xml configuration file is being used to upload the startup environment:


      a bit lower it evaluates one of the fields of the xml file to save a boolean value:


      As a default it sets the True value, so when we do the evaluation, we are able to access the enablecolor variable: Instead of true/false value, it's possible to inject python code so that it delivers us a reverse shell.

      When we run framework, the previous line is evaluated and and it delivers a console with the same privileges of the attacker that is running the modules:


      It's pretty strange that eval is used from a configuration file to set variable. When you look at it, you can tell that they were thinking more about ease of development without paying a huge amount of attention to the security aspect. 

      This should get everyone pretty excited if they are trying to find errors in these tools!


      Debugging the Module

      The modules are executables compiled so that they run the launcher with the subprocess.Popen. After, configuring some of the files, in the following image we can see the command in question:


       fuzzbunch runs the binary and waits a maximum of 45 seconds so that the binary establishes communication through an IPC. In case you reach the timeout, the framework throws up a message error in the IPC channel.



      CONNECT_TIMEOUT_SECS is defined a couple lines above 

      To analyze this, we have to modify the binary with a loop in the  EntryPoint and we need to increase the seconds for the Timeout to a value that lets us look at it with the environment running.

      The EntryPoint is overwritten with an infinite loop, allowing us to sleep the process allowing us to attach ourselves. 



      Now we only need to run the module, attach the process with a debugger such as OllyDBG o  x32dbg and we are able to restore the original bytes of the process

      Keep in mind that fuzzbunch runs the process two times. The first time to verify that everything works correctly with the parameter  --ValidateOnly and the second runs the exploit 

      If your goal is find crucial parts of the program, such as the state of the backdoor or the delivery of the exploit, we are able to stop it from running in TcLog that is a function that prints all the texts that are on the screen.

      We can also see in send and recv that the use of these functions is to deliver packets.


       All the tips we mentioned should work with any module that has the framework.

      Ping to the Backdoor

      One of the verifications that the module does before triggering the vulnerability is to see if the machine was compromised. To do this it sends a SMB packet and in the base to response recognized if it is or isn't infected. Additionally, it lets you send the status of the backdoor DoublePulsar


      This information comes inside one of the packets that were sent. The important field is 51h that is marked in the picture:


      the possibilities are enumerated in the next switch:



      the options are:
      • 00h means that the machine isn't compromised (yet)
      • 51h means the agent is already installed and operating
      • 61h 71h 81h 91h are messages of the state, such as, ''Bad transaction" or "Invalid transaction Param"

      It's important to mention that there are already modules in different tools such as nmap or metasploit to check to see if a machine was compromised.


      CREDITS
      Javier Aguinaga, German Riera y Ezequiel Tavella
      (Infobyte Security Research Team)
      Contributions
      Josh Mador
      (Infobyte Security )

      The newest Faraday version yet - all hail v2.6!

      Let's give a warm welcome to Faraday v2.6 (Community, Pro & Corp)!

      Faraday is the Integrated Multiuser Risk Environment you were looking for! It maps and leverages all the knowledge you generate in real time, letting you track and understand your audits. Our dashboard for CISOs and managers uncovers the impact and risk being assessed by the audit in real-time without the need for a single email. Developed with a specialized set of functionalities that helps users improve their own work, the main purpose is to re-use the available tools in the community taking advantage of them in a collaborative way! Check out the Faraday project in Github.



      Improving the Data Analysis tools

      As per your requests, we made some changes to the existing Data Analysis tools introduced in the last release. We added the possibility to change data configuration in order to customize charts, a new bar chart type to show most vulnerable services and a filter for undefined or null values.
      Image may be NSFW.
      Clik here to view.
      Most vulnerable services

      Image may be NSFW.
      Clik here to view.
      Modal to set chart properties

      Image may be NSFW.
      Clik here to view.
      Charts customization




      Executive Report clean up

      Some users reported issues with the sorting of Hosts and Evidence in the reports. We fixed it so the hosts in grouped reports are sorted by IP and evidence is sorted by alphabetically by name.

      Image may be NSFW.
      Clik here to view.
      Targets are sorted by IP
      Image may be NSFW.
      Clik here to view.
      Evidence names sorted alphabetically

      We know sometimes it is necessary to use special characters for evidence names. Some of our users

      Web UI

      Now you can manually create the same vulnerability in several hosts at once! Select as many targets as you want when creating your vulns.


      Image may be NSFW.
      Clik here to view.
      Add vuln to multiple targets at once

       
      Also, we made the vulnerability creation modal more consistent with the rest of the views by starting the pagination of the targets in page 1 instead of 0.

      Corp changes and fixes

      • Improved Data analysis charts. Added more chart properties and data binding

      Pro changes and fixes

      • Improved target ordering in grouped reports 
      • Fixed bug with new line character in reports DOCX 
      • Adds alphabetical sort for Evidence in the Executive Report 
      • Fix bug updating users with no roles 
      • Fixed report creation with evidence names containing special chars

      Community changes and fixes

      • Added the ability to select more than one target when creating a vuln in the Web UI 
      • Merged PR #182 - problems with zonatransfer.me 
      • Fixed bug in Download CSV of Status report with old versions of Firefox
      • Fixed formula injection vulnerability in export to CSV feature 
      • Fixed DOM-based XSS in the Top Services widget of the dashboard 
      • Fix in AppScan plugin
      • Fix HTML injection in Vulnerability template
      • Add new plugin: Junit XML
      • Improved pagination in new vuln modal of status report 
      • Added "Policy Violations" field for Vulnerabilities
      We hope you enjoy it, and let us know if you have any questions or comments.

      https://www.faradaysec.com

      https://github.com/infobyte/faraday
      https://twitter.com/faradaysec

      https://forum.faradaysec.com/


      https://www.faradaysec.com/ideas

      Next Stop, Vegas! Faraday at Black Hat USA 2017


      Every year we look forward to the Black Hat events, which are some of the world's premier information security conferences. These events are always great places to see the latest research and trends in the industry. Black Hat USA 2017 is coming up and we are happy to announce that Faraday will be participating as an official sponsor🎉


      Con Season is upon us!

      Faraday is a comprehensive platform for vulnerability management and collaborative pentesting. It is a real-time environment with 60+ integrated tools, that helps organizations from small teams to the global 2000 make smarter security investments and leverage existing resources.

      This July 26th and 27th, we will have the opportunity to share with you the latest version of Faraday and hopefully we can talk about how the platform can help optimize your daily workflow and maybe even make pentesting a bit more fun.

      Black Hat USA, in it’s 20th year, it is a staple of the InfosSec Con Calendar. The event brings together more than 15,000 attendees for 5 days of innovative trainings, the Business Hall, the Arsenal event and cutting edge talks. It’s a great hub to share, learn and connect with old and new friends, all while enjoying everything that Vegas has to offer. If you’re going to be there drop us a line and we would love to meet up and continue the conversation.

      Come to #BHUSA - Mandalay Bay - Business Hall (July 26th - 27th) 
      We will be at booth IC43🤞🙌

      We are excited for Vegas, Black Hat and to see you there!👌
      Faraday Team💪

      Learn more about Faraday through our channels 📢
      https://www.faradaysec.com
      https://github.com/infobyte/faraday
      https://twitter.com/faradaysec 
      https://forum.faradaysec.com/
      https://www.faradaysec.com/ideas

      Infobyte and Faraday in the Windy City! Bsides: Chicago is coming!



      Hello Chicago! Bsides Security Conference 2017 is just around the corner!


      Founded in 2011, Bsides Chicago was originally started as a complement to ThotCon. Since then it has grown to become one of Chicago's Premier Security Conferences. The one day event is packed with over 1,000 participants 21 talks in 3 tracks, 2 workshops, a CTF, Lockpick Village and a interesting Keynote talk.


      If you're going to be in Chicago, we'd love to chat about Faraday, our comprehensive platform for vulnerability management and collaborative pentesting to see how it can help and improve your workflow. If you’re going to be at the event or in the area, let us know and we can arrange to meet up.


      When and Where?
      Saturday, July 15th, 2017
      Chicago Hilton
      720 S Michigan Ave
      Chicago, IL

      Welcome to BSides Chicago 2017! Hoping to connect with you there ✈️



      Follow Us On Social Media 😉




      Faraday Challenge version 2017

      The potential of the open source community is huge and one more time our team wants to honor and expand it. We invite you to participate in the Faraday Challenge version 2017!

      We trust in your power to innovate and transform, to think out of the box and add value to our projects with a renewed perspective. That's why we invoke your creativity and reward you with tickets for Ekoparty🙌 💻 the most awesome security offensive conference in Latin America (Buenos Aires - September 27, 28, 29 at Konex) and this year one proposal will be selected as the winner and receive a free flight to attend the conference!
      Game of Codes 🎮

      If you feel that you can develop or make an innovative contribution to Faraday v2.6 we encourage you to participate! Share your work and win tickets for Eko13, where we will love to meet you and have a good time surrounded by what we enjoy most - great talks, challenges, games, demos, workshops and beer.

      It´s very easy to participate!

      • Login in Github
      • Fork the Faraday Project (http://github.com/infobyte/faraday)
      • (Your favorite part!) Star to write your code!
      • When you are finished, create a pull request
      • We are going to review your code and give you the OK
      • Ready! Have your eko-ticket

      Some ideas that might be interesting

      • New visualizations for the Dashboard
      • Improvements on the documentation
      • Tutorials showing your creative uses for the platform
      • New integration with other tools (ideas for previously requested tools here
        http://bit.ly/2gmrqON)

      Keep in mind these important details✍️

      You have time to participate until September 15th.
      Only one ticket will be given for each feature. But if you developed more than one, you will get more access to share and come to the ekoparty with your partners and friends. PRs must be submitted between August 31st and September 15th to be accepted in the challenge.
      From all the winners, we will be choosing the best three features proposals and each person will receive a VIP pass.
      And for the big prize,one proposal will be selected as the winner and receive an airplane ticket* to attend the conference!


      For any questions, you can contact us by using the hashtag #FaradayChallenge or contact us by twitter in @faradaysec


      Ekoparty is coming and we'd love to see you there 🙋‍



      * Up to 2k USD dollars. Restrictions may apply.

      Ekoparty Challenge by Infobyte



      La semana pasada fue la Ekoparty edicion 13, una vez mas, los security researchers de distintas partes del mundo se juntaron para mostrar lo que saben y compartir su conocimiento con el publico.

      Desde Infobyte sponsoreamos con Faraday la conferencia y ademas decidimos organizar por primer vez un challenge para los asistentes.

      Este challenge consistio en un Mini CTF, el cual tenia varios retos Web en su gran mayoria, con un reto de reversing - exploiting de binarios, ademas de un reto un tanto especial... Hijackear un Drone.

      Los premios

      • Primer puesto: Playstation 4  - 500 GB.

      Los retos

      Eran bastantes diversos en cuanto a la vulnerabilidad hasta su dificultad, aun asi hubo retos que no pudieron ser resueltos los cuales quedaran para el siguiente challenge.



      Algunos de estos retos implicaban:
      • Conceptos sencillos como realizar un escaneo de puertos con Nmap y descubrir un puerto alto con un servicio que devolvia el flag si uno se conectaba varias veces a el, o un open redirect el cual en la redireccion enviaba un Header especial el cual contenia el Flag.
      • Retos un poco mas complejos como un servicio Vsftpd con un backdoor custom el cual descubrias su codigo en una carpeta de backup, y haciendo un poco de code review en la diferencia entre el source code entregado y la version original del servicio encontrabas el backdoor!
      • Incluso un XXE el cual era sencillo de explotar, pero necesitabas saber que el stream para leer el Flag oculto en el archivo xxx.php era php:// y no file://, ya que este estaba filtrado.
      • Un reto un tanto especial que consistia en Hijackear un drone que teniamos en el stand, el cual nadie puedo lograrlo, pero si dos personas intentaron, uno de ellos llegando bastante cerca pero por falta de tiempo no pudo terminarlo. En unas semanas vamos a estar publicando todos los detalles para hacerlo en este blog.

      Los equipos

      Unos 30 equipos se registraron, pero solo participaron activamente unos 7 equipos.
      A continuacion pueden ver un grafico de puntuaciones.


      Felicitaciones a RL_TEAM, csalazar y Null por ganar los tres primeros puestos!


      Gracias a todos por participar, esperamos que haya sido entretenido para ustedes y hayan aprendido algo nuevo.
      Si participaron no duden en dejarnos Feedback en los comentarios, asi podemos volver el año que viene con un mejor Challenge.

      Viewing all 236 articles
      Browse latest View live


      <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>