Friday, May 22, 2020

Diggy - Extract Enpoints From APK Files


Diggy can extract endpoints/URLs from apk files. It saves the result into a txt file for further processing.


Dependencies
  • apktool

Usage
./diggy.sh /path/to/apk/file.apk
You can also install it for easier access by running install.sh
After that, you will be able to run Diggy as follows:
diggy /path/to/apk/file.apk


Related news


Wednesday, May 20, 2020

Cómo Te Pueden Hackear Cuentas De Whatsapp Usando El Buzón De Voz

Algo que sabes, algo que tienes y algo que eres. Estas son las tres categorías de las que se sirven los sistemas para autenticar a un usuario, es decir, el proceso por el cual la identidad que está queriendo acceder puede responder a la pregunta de quién. Gran parte de los servicios de Internet, en sus inicios, solicitaban únicamente en el registro la necesidad de tener asociado un correo electrónico para cambiar la contraseña.

Figura 1: Cómo te pueden hackear cuentas de Whatsapp usando el buzón de voz

Para un atacante que quisiera conseguir el acceso a un servicio de una persona, primero debía conocer cuál era el correo electrónico de su objetivo, y luego centrarse en conseguir acceso al e-mail, robando la contraseña con un ataque de Spear Phishing, consiguiendo un token OAuth que permitiera leer todos los mensajes como se explica en Sappo, o aprovechándose de que la cuenta de e-mail de recuperación de contraseña sea olvidada y caduquePero el primer paso, siempre es el mismo. Conocer la dirección de e-mail que utiliza un objetivo para identificarse en los servicios de Internet cuando en inicio era solo para recibir mensajes.

El correo electrónico como elemento esencial para la autenticación

En muchas ocasiones, haciendo una simple búsqueda en Google usando técnicas de Hacking con Buscadores podríamos dar con el correo electrónico de una persona. Sin embargo, podría ser que esa persona no hubiera publicado nunca, por lo que podemos recurrir a las siguientes técnicas:

- Leak del login: Chema Alonso ya hablaba sobre ello en el artículo Redes sociales de contactos íntimos que filtran cuentas de sus clientes en donde, introduciendo el correo electrónico, el propio servicio te dice si hay una cuenta creada o no con esa dirección de correo. En servicios como Gmail, además de validar que ese correo existe puedes saber hasta la marca del móvil de la persona ya que se le requiere al usuario acceder a la pestaña de "Seguridad" para obtener el código de seguridad y así poder autenticarse.

Figura 2: Artículo "¿Está seguro tu presidente en Twitter?"
de Yaiza Rubio y Felix Brezo publicado en el blog de ElevenPaths

En cambio, en Outlook, si el correo existe directamente te solicita la contraseña. O, por ejemplo, en 2017, mi compañero Félix Brezo y yo identificamos las cuentas de Twitter de todos los Presidentes de Gobierno y vimos que al menos el 85% de ellos exponía un indicio de la cuenta utilizada en esta red social o que un 30% utilizaron una cuenta de Gmail para su registro.

- Combinaciones de nombre de usuario y servicio de correo: cuando nos encontramos en una situación en la que desconocemos cuál es la cuenta utilizada, en OSRFramework disponemos de una herramienta que se llama mailfy que, pasándoles como parámetro de entrada un nombre de usuario o una dirección de e-mail, te valida si hay una cuenta registrada en servicios como Facebook, Gmail y otros.

Figura 3: Manual de Ciberinvestigación en Fuentes Abiertas: OSINT para Analistas
 
Esta es una herramienta que utilizamos mucho en nuestros ejemplos de búsqueda de información de fuentes OSINT para el mundo de la ciberinvestigación. 

Una vez que hemos conseguido saber la dirección de correo electrónico, al final, todo concluye en poder recuperar el acceso perdido. Un sistema ampliamente aceptado por la mayoría de los servicios como método de recuperación de cuentas cuando te has olvidado de la contraseña, pero que a más de una "celebritry" le ha traído algún que otro disgusto.

El número de teléfono como elemento esencial para la autenticación

Viendo que las direcciones de correo electrónico y el uso de las contraseñas no era lo más recomendable, nació la autenticación basada en el número de teléfono. Con este objetivo, se han creado, entre otros, servicios como el de Mobile Connect, en donde se eliminan por completo las contraseñas. El usuario final introduce su número de teléfono y la operadora automáticamente te envía un desafío de cara a comprobar la posesión del número de teléfono y así finalizar la autenticación. Sin embargo, existen otros servicios de internet como WhatsApp y Telegram que basan la creación de sus cuentas en el número de teléfono.

Empecemos por Whatsapp

Imaginemos la situación en la que un atacante quiere hacerse con una cuenta de un usuario de Whatsapp. Después de instalar la app, tendrá que indicar cuál es el número de teléfono de la cuenta que quiere recuperar en ese terminal y, posteriormente, seleccionar uno de los dos métodos de los que dispone la plataforma para hacer llegar al usuario el código de verificación.

Vamos a plantear tres escenarios que pueden darse. En el Escenario 1, nos encontramos en la situación en la que usuario legítimo dispone de su móvil y recibe un SMS debido a que el atacante ha solicitado el código para verificar el número. 

Figura 4: Verificación de registro de WhatsApp por SMS

A pesar de que este escenario es menos probable de que pueda tener éxito, en el pasado, se ha dado la situación en la que a la víctima se le solicitaba el código de verificación en nombre de Whatsapp. Mira que en el mensaje del SMS lo pone bien claro:  "¡No compartas este código con nadie!" Pero hay más métodos.

1.- Ingeniería social: Como hemos dicho, preguntándole a la víctima por medio de un e-mail, otro SMS, una cuenta maliciosa de WhatsApp o llamándole por teléfono directamente. Cuando se trata de engañar a un usuario, cualquier camino es válido.

2.- App maliciosa o vulnerable con permiso para acceder a los SMS: Si el atacante tiene controlada una app maliciosa con permisos para leer los SMS en el terminal podría recuperarlo siempre. Por ello, hay que tener mucho cuidado qué apps nos instalamos - no tengamos un troyano o una Gremlin App - y tener el sistema operativo y las apps actualizadas. Si tu terminal no soporta las últimas versiones del sistema operativo de Android, deberías pensar en cambiarlo.

3,. SIM Duplicada: Si alguien te puede duplicar tus documentos de identidad, con una fotocopia, o consigue convencer a un empleado en una tienda de tu operadora para conseguir un duplicado de tu SIM, podría recibir los SMS al mismo tiempo, por eso hay que tener mucho cuidado con tu información personal y documentos de identidad.

4.- SIM Swapping: En algunos países, los ataques se hacen abusando de las políticas de portabilidad de números, por lo que es importante conocer cómo de protegido está tu número frente a un intento de portabilidad.

5.- Ataques RTL: Se trata de abusar de la seguridad del canal SMS. Para ello, si el atacante está cerca y conoce bien las herramientas y ataques del Hacking de Comunicaciones Móviles, podría capturar el SMS cuando la antena más cercana los reenvíe hacia tu terminal.

6.- Previsualización de SMS: Si tienes la previsualización de mensajes SMS en la pantalla bloqueada de tu terminal, alguien podría acceder a ellos en un descuido. Sería un ataque local, pero igualmente peligroso. Igual que el truco con Siri para robar cuentas de e-mail.

Como veis, la verificación de dueño de WhatsApp por SMS tiene sus "corner cases" y hay que tener ciertas medidas de precaución, para evitar que uno de estos casos nos afecte. Aún así, quedan dos posibilidades más que pueden ser fácilmente aprovechables por un atacante cercano o remoto.

Escenario 2: Llamada de teléfono

En el Escenario 2, se envía el código de verificación por SMS y, si al cabo de un minuto, no se ha introducido, la víctima podría recibir una llamada a su número de teléfono donde se le indica cuál es su código de verificación. 

Figura 5: Verificación por llamada al número de teléfono

En estos entornos, si el atacante dispusiera del teléfono de la víctima, directamente podría coger la llamada, escuchar el código de verificación y hacerse con la cuenta ya que para descolgar una llamada de teléfono no hay que desbloquear el terminal.

El buzón de voz

Pero imaginemos que la víctima no coge la llamada. Entonces se da el Escenario 3. Automáticamente, WhatsApp te deja un mensaje en el buzón de voz. Y entonces te lo pueden robar del buzón de voz. Para acceder al buzón de voz, suelen existir dos maneras:

1.- Desde tu teléfono: Haciendo la llamada desde el número de teléfono para el que vas a acceder al buzón de voz, por lo que no necesitas dar la contraseña.

Figura 6: WhatsApp deja el código de verificación en el buzon

2) Desde otro teléfono: haciendo una llamada a un número de teléfono si la llamada que se está realizando no es desde el número de teléfono del buzón de voz. En esta situación, te solicitará el PIN en donde dispones de tres intentos. Si esos tres intentos son erróneos se cuelga la llamada. En esta situación, el atacante podría recurrir a estadísticas sobre la frecuencia de uso de los número PIN, en donde el 1234 es el más frecuente, seguido del 1111 y del 0000.

Telegram: El SMS, la llamada y el buzón de Voz

La popular competencia de WhatsApp, el popular Telegram dispone de un sistema parecido. Ofrece a los usuarios los mismos dos métodos: envío del código de verificación mediante SMS y, al cabo de dos minutos, llama al número de teléfono cuya cuenta se quiere recuperar para decirle cuál es el código de verificación, con la salvedad de que no deja el código en el buzón de voz. Esto hace que el problema del ataque al buzón de voz de WhatsApp no le afecte.

Figura 7: Telegram también dispone de código y
llamada telefónica como métodos de validación.

Si bien es cierto que cualquier servicio en Internet debe crear procesos sencillos de cara a captar más usuarios y entendibles a nivel de seguridad para el usuario, esta última opción que ofrece WhatsApp de dejar el código de verificación en el buzón de voz no es ni sencilla, ya que es probable que nadie conozca cuál es su PIN para acceder al buzón de voz y, ni es segura, ya que un atacante con un poco de maña podría sin tener acceso físico al teléfono acceder a la información antes de que el usuario se dé cuenta. 

Recomendaciones de seguridad

Como punto final, os recomiendo el artículo de  Cómo espiar WhatsApp que, aunque tiene ya bastante tiempo, muchos de los ataques sigue funcionando de una forma similar. Respecto a tener protegido tu cuenta de WhatsApp, te dejo esta serie de Proteger tu cuenta de WhatsApp a prueba de balas.

Y para el caso concreto del buzón de voz, asegúrate de que nadie remotamente pueda acceder, ya sea porque tienes desactivado el buzón de voz o porque has cambiado el PIN por defecto. Asegúrate de eso. Por otra parte, tal vez WhatsApp deba replantearse dejar el PIN en un buzón de voz, ya que abre un vector de ataque que tal vez el usuario no sea consciente.

Saludos,


Contactar con Yaiza Rubio

Continue reading


  1. White Hacking
  2. Social Hacking
  3. Kali Linux Hacking

Top 20 Best Free Hacking Apps For Android |2019|

 20 Best Free hacking apps For Android |2019|. 

Android is now one of the most popular operating systems. So, hackers have also started using Android devices for their tasks. Now Android devices are used for penetration testing and other hacking activities including IT security administrator, Wi-Fi hacking and network monitoring. There are several hacking apps or Android devices. So, we have curated a list of best hacking apps for Android.


Before you start using these apps, you must take a backup of your important data. I also recommend the use of these apps on a separate device. Using this on your primary phone is not recommended. It is because many of these apps require a rooted device and app can also harm your phone.


Note: Hacking apps can be used for educational and malicious purpose. But we never encourage malicious operations. We are listing the apps here just for educational purpose. You should only use these apps to learn. We do not support any unethical use of these apps.

1.  AndroRAT

AndroRAT stands for Android RAT. RAT is the short form of Remote Administrative Tool and it allows an attacker to remotely control and fetch information from a device. AndroRAT does the same thing. It has a server developed in Java/Swing but the Android application has been developed in Java Android.

AndroRAT allows you to connect information like call logs, contacts, messages, location and more. You can remotely monitor sent and received messages send texts, use the camera, open a URL in the browser, make phone calls and remotely monitor the device.

The connection to the server can be triggered by an SMS or a call. From the server GUI, you can check all the connected clients and access information.

As the app allows silent remote access, it is not available on Play Store.

                Download APK

2. zANTI

zANTI is a known penetration testing suite of applications you can install locally on Android smartphone. This tool brings scanning tools Diagnostic features and Reporting tools. You can use this malicious software to attack a network and check for any loopholes in your network. This tool is used to test redirect and SSL stripping attacks. You can edit request and response messages from web servers, the host takes websites from your Android phone and more.


                  Download 

3. FaceNiff

FaceNiff is another good Android hacking that allows you to intercept the traffic of your WiFi network. You can use this tool to snoop what people are doing on the network you are. You can snoop on services like Facebook, Twitter, Amazon, YouTube and more. This is one of the notable too for steal cookies from the WiFi network and gives the attacker unauthorized access to other people's account.

This app requires a rooted device. So, you can only use the app if you have a rooted phone.

Download APK

4. Droidsheep

Droidsheep is also a similar app that helps security analysts understand what is happening in your Wi-Fi network. Like Face Sniff, this app can also hijack the web session profiles over a network and supports most of the services and websites.

The primary difference between Droidsheep and FaceSniff is that Droidsheep works with almost all the websites while FaceSniff has limited support.

                     Download APK

5. Hackode

Hackode is another good hacking apps for Android. It is not a single app but a collection of tools for ethical hackers and penetration testers. The app comes with three modules including Reconnaissance, Scanning and Security Feed. You can use this app for SQL Injection, Google hacking, MySQL Server, Whois, Scanning, DNS Dif, DNS lookup, IP, MX Records, Security RSS Feed, Exploits etc.

The app is still in beta, but available in Play Store.

                  Download Here

6. cSploit

cSploit is also a good security tool for Android. It comes with several options like cracking Wi-Fi password, installing backdoors, finding vulnerabilities and their exploits. If you are looking for a good hacking app or hacker app for Android, you should try this one for sure.

                  Download APK

7. DroidBox

DroidBox is also a similar kind of app that allows you to do the dynamic analysis of Android applications. You can use this app to get information like hashes of APK package, network traffic, SMS & phone calls, Incoming/outgoing network data, Listing broadcast receivers and more.

                    Download

8. Nmap

If you are into security or hacking, I am sure you already know the name of this too. Like the desktop tool, Nmap for Android also allows you to scan

It works on both on non-rooted and rooted phones. If you are a beginner, you should try this app and learn from it.

                      Download

9. SSHDroid

SSHDroid is SSH tool developed for Android. It lets you connect to a remote computer and run terminal commands, transfer and edit files. The app also provided features like shared-key authentication, WiFi autostart whitelist, extended notification control etc,

This app is available on Play Store.

                    Download

10. Kali Linux NetHunter

Kali Linux NetHunter is an open source penetration testing platform for Android. It officially supports Nexus and OnePlus devices. It provides the ultimate penetration testing platform that allows you to perform a wide range of attacks.

                     Download

11. APKInspector

APKInspector allows you to perform reverse engineering on an APK. you can use this to get a deep insight or APK and get the source code of any Android app. You can do modifications in the APK and visualize the DEX code to erase the credits and license.

                 Download APK

12. Shark for Root

Shark for Root is an advanced hacking tool for security experts and hackers. It can work as a traffic snipper. You can use the tcpdump command on rooted devices. It works on Wi-Fi, 3G, and FroYo tethered mode.

                    Download

13. dSploit

dSploit is an Android network penetrating testing suit. You can download and install it on your device to perform network security testing. It supports all Android devices running on Android 2.3 Gingerbread or higher. You need to root this phone for using the app. After rooting the phone, you need to download BusyBox from Google Play Store

The app comes with several modules including Port Scanner, Inspector, RouterPWN, Trace, Login Cracker, Packet Forger, Vulnerability Finder, and MITM.

                      Download

14. WPScan

WPScan is a WordPress vulnerability scanner for Android. This app is used to scan WordPress based websites and find possible vulnerabilities. WPScan is a popular desktop tool but this WPScan for Android is not related to that. So, do not think of it as an official WPScan app.

                      Download

15. Network Mapper

Network Mapper is a network scanner tool for network admins. It used to scan the network, lists all devices connected and find Open ports of various servers like FTP servers, SSH servers, SMB servers etc on the network. The tool is available on Play Store.

                     Download

16. Andosid

Andosid is like LOIC for the desktop. This tool is used to perform DOS attacks from Android mobile phones. You can use this tool to set a target URL and perform a DOS attack in one click. The tool will start flooding target URL with fake requests.

                     Download

17. DroidSQLi

DroidSQLi app allows attackers to perform SQL Injection on a target URL. You just need to find a target URL and this tool will start the fully automated SQL Injection attack.

                     Download

18. AppUse

AppUse is a Virtual Machine developed by AppSec Labs. It is a freely available mobile application security testing platform that comes with lots of custom made tools by AppSec Labs. If you want to sue your Android phone as your penetration testing tool, this one is for you.

                   Download

19. Network Spoofer

Network Spoofer is also a good hacking app for android. It lets you change the website on other people's computer from your Android phone. Connect to a WiFI network and then choose a spoof to use with the app. this tool is to demonstrate how vulnerable a network is. Do not try this on any unauthorized networks.

                 Download

20. DroidSheep Guard

As the name suggests, DroidSheep Guard works against DroidSheep. It monitors Android devices' ARP-table and tries to detect ARP-Spoofing attack on your network. It does not require a rooted device.

               Download


@EVERYTHING NT


Related word
  1. Significado De Hacker
  2. Cómo Se Escribe Hacker
  3. Raspberry Hacking
  4. Mindset Hacking Nacho
  5. Que Estudia Un Hacker
  6. Hacker Seguridad Informática
  7. Hacking Web
  8. Hacking Net
  9. Hacking Smart Tv
  10. Definicion De Cracker
  11. Hacking Y Forensic Desarrolle Sus Propias Herramientas En Python Pdf

Tuesday, May 19, 2020

Many Ways Of Malware Persistence (That You Were Always Afraid To Ask)

TL;DR: Are you into red teaming? Need persistence? This post is not that long, read it ;)
Are you into blue teaming? Have to find those pesky backdoors? This post is not that long, read it ;)

In the previous post, I listed different ways how a Windows domain/forest can be backdoored. In this new post, I am digging a bit deeper, and list the most common/known ways malware can survive a reboot, just using local resources of the infected Windows system. The list is far from complete, and I would like to encourage everyone to comment on new methods, not yet listed here.

From an incident response point of view, one of the best strategies to find malware on a suspicious system is to search for suspicious entries that start with the system. In the good old days, you had to check for 2-3 locations to cover 99% of the infections. Nowadays, there are a thousand ways malware can start. The common ones automatically start whenever Windows starts (or the user logs in), but some tricky ones are triggered by other events.

Autoruns

My favorite choice when it comes to malware persistence is Sysinternals tools, Autoruns. In this paragraph, I mainly quote the official built-in help, but bear with me, it is still interesting.

On a side note, there are some problems with the Autoruns tool: it can only run on a live system. (EDIT: This is not true, Autoruns can analyze offline systems as well! Thanks to a comment from Justin.) And usually, this is not the case - I usually have dd images. And although VBoxManage can convert the dd images to VirtualBox disk image format, usually I don't have the time and storage to do that. This is where xmount awesomeness is here to rescue the day. It can convert dd and Encase images on-the-fly in-memory to Virtualbox format. Just attach the disk image to a new Virtualbox machine as the main boot HDD, modify the CPU/disk/controller settings until Windows starts instead of crashing, and voila, you can boot your forensic image - without modifying a single bit on the original evidence dd file. Another problem with malware analysis on a live system is that a good rootkit can fool the analyst easily. 

For quick wins, I usually filter out Microsoft entries, look for per-user locations only and check for unverified (missing or invalid Authenticode) executables. This usually helps to find 90% of malware easily. Especially if it has a color like purple or pink, it is highly suspicious. To find the rest, well, one has to dig deeper.
Zeus "hiding" in the usual random directory - check the faked timestamp
To implement "poor-mans monitoring", regularly save the output of Autoruns, and during incident response, it will be highly valuable. Howto guide here.

Logon

"This entry results in scans of standard autostart locations such as the Startup folder for the current user and all users, the Run Registry keys, and standard application launch locations." 
There are 42 registry keys/folders at the moment in Autoruns, which can be used to autostart a malware. The most common ways are the HKCU\Software\Microsoft\Windows\CurrentVersion\Run and the C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup folder.
One of my favorite regarding this topic is the file-less Poweliks malware, 100% pure awesomeness. Typical ring 3 code execution.

Explorer

"Select this entry to see Explorer shell extensions, browser helper objects, explorer toolbars, active setup executions, and shell execute hooks". 71 registry keys, OMG. Usually, this is not about auto-malware execution, but some of them might be a good place to hide malware.

Internet explorer

"This entry shows Browser Helper Objects (BHO's), Internet Explorer toolbars and extensions". 13 registry key here. If a malicious BHO is installed into your browser, you are pretty much screwed.

Scheduled tasks

"Task scheduler tasks configured to start at boot or logon." Not commonly used, but it is important to look at this.
I always thought this part of the autostart entries is quite boring, but nowadays, I think it is one of the best ways to hide your malware. There are so many entries here by default, and some of them can use quite good tricks to trigger the start.
Did you know that you can create custom events that trigger on Windows event logs?
Did you know you can create malware persistence just by using Windows tools like bitsadmin and Scheduled tasks?
Scheduler in the old days
Scheduler in the new days

Services

HKLM\System\CurrentControlSet\Services is a very commonplace to hide malware, especially rootkits. Check all entries with special care.

Drivers

Same as services. Very commonplace for rootkits. Unfortunately, signing a driver for 64-bit systems is not fun anymore, as it has to be signed by certificates that can be chained back to "Software Publisher Certificates". Typical startup place for Ring 0 rootkits. 
Starting from Windows 10, even this will change and all drivers have to be signed by "Windows Hardware Developer Center Dashboard portal" and EV certificates.

Codecs

22 registry keys. Not very common, but possible code execution.

Boot execute

"Native images (as opposed to Windows images) that run early during the boot process."
5 registry keys here. Good place to hide a rootkit here.

Image hijacks

"Image file execution options and command prompt autostarts." 13 registry key here. I believe this was supposed for debugging purposes originally.
This is where the good-old sticky keys trick is hiding. It is a bit different from the others, as it provides a backdoor access, but you can only use this from the local network (usually). The trick is to execute your code whenever someone presses the SHIFT key multiple times before logging into RDP. The old way was to replace the sethc.exe, the new fun is to set a debug program on sethc.
If you see this, you are in trouble

AppInit

"This has Autoruns shows DLLs registered as application initialization DLLs." Only 3 registry keys here. This is the good old way to inject a malicious DLL into Explorer, browsers, etc. Luckily it is going to be deprecated soon.

Known DLLs

"This reports the location of DLLs that Windows loads into applications that reference them." Only 1 registry key. This might be used to hijack some system DLLs.

Winlogon

"Shows DLLs that register for Winlogon notification of logon events." 7 registry keys. Sometimes used by malware.

Winsock providers

"Shows registered Winsock protocols, including Winsock service providers. Malware often installs itself as a Winsock service provider because there are few tools that can remove them. Autoruns can disable them, but cannot delete them." 4 registry keys. AFAIK this was trendy a while ago. But still, a good place to hide malware.

Print monitors

"Displays DLLs that load into the print spooling service. Malware has used this support to autostart itself." 1 registry key. Some malware writers are quite creative when it comes to hiding their persistence module.

LSA providers

"Shows registers Local Security Authority (LSA) authentication, notification and security packages." 5 registry keys. A good place to hide your password stealer.

Network providers

"Missing documentation". If you have a good 1 sentence documentation, please comment.

WMI filters

"Missing documentation". Check Mandiant for details.

Sidebar gadgets

Thank god MS disabled this a while ago :)
We all miss you, you crappy resource gobble nightmares

Common ways - not in autoruns

Now, let's see other possibilities to start your malware, which won't be listed in Sysinternals Autoruns.

Backdoor an executable/DLL

Just change the code of an executable which is either auto-starting or commonly started by the user. To avoid lame mistakes, disable the update of the file ... The backdoor factory is a good source for this task. But if you backdoor an executable/DLL which is already in Autoruns listed, you will break the Digital Signature on the file. It is recommended to sign your executable, and if you can't afford to steal a trusted certificate, you can still import your own CA into the user's trusted certificate store (with user privileges), and it will look like a trusted one. Protip: Use "Microsoft Windows" as the codesigner CA, and your executable will blend in.
See, rootkit.exe totally looks legit, and it is filtered out when someone filters for "Hide Windows entries".


Hijack DLL load order

Just place your DLL into a directory which is searched before the original DLL is found, and PROFIT! But again, to avoid lame detection, be sure to proxy the legitimate function calls to the original DLL. A good source on this topic from Mandiant and DLL hijack detector.


Here you can see how PlugX works in action, by dropping a legitimate Kaspersky executable, and hijacking the DLL calls with their DLL. 

Hijack a shortcut from the desktop/start menu

Never underestimate the power of lame tricks. Just create an executable which calls the original executable, and meanwhile starts your backdoor. Replace the link, PROFIT! And don't be a skiddie, check the icon ;) I have seen this trick in adware hijacking browsers a lot of times.

IE hijacked to start with http://tinyurl.com/2fcpre6

File association hijack

Choose the user's favorite file type, replace the program which handles the opening with a similar one described in the previous section, and voila!

COM object hijack

The main idea is that some COM objects are scanned for whether they are on the system or not, and when it is registered, it is automatically loaded. See COMpfun for details.

Windows Application Compatibility - SHIM

Not many people are familiar with Windows Application Compatibility and how it works. Think about it as an added layer between applications and the OS. If the application matches a certain condition (e.g. filename), certain actions will take place. E.g. emulation of directories, registry entries, DLL injection, etc. In my installation, there are 367 different compatibility fixes (type of compatibility "simulation"), and some of those can be customized.
Every time IE starts, inject a DLL into IE

Bootkits 

Although bootkits shown here can end up in Autoruns in the drivers section (as they might need a driver at the end of the day), I still think it deserves a different section.

MBR - Master boot record

Malware can overwrite the Master boot record, start the boot process with its own code, and continue the boot process with the original one. It is common for rootkits to fake the content of the MBR record, and show the original contents. Which means one just have attached the infected HDD to a clean system, and compare the first 512 bytes (or more in some cases) with a known, clean state, or compare it to the contents shown from the infected OS. SecureBoot can be used to prevent malware infections like this.
There is a slight difference when MBR is viewed from infected OS vs clean OS

VBR - Volume boot record

This is the next logical step where malware can start it's process, and some malware/rootkit prefers to hide it's startup code here. Check GrayFish for details. SecureBoot can be used to prevent malware infections like this.

BIOS/UEFI malware

Both the old BIOS and the new UEFI can be modified in a way that malware starts even before the OS had a chance to run. Although UEFI was meant to be more secure than BIOS, implementation and design errors happens. Check the Computrace anti-theft rootkit for details.

Hypervisor - Ring -1 rootkit

This is somewhat special, because I believe although rootkit can run in this layer but it can't persist only in this layer on an average, physical machine, because it won't survive a reboot See Rutkowska's presentation from 2006 But because the hypervisor can intercept the restart event, it can write itself into one of the other layers (e.g. install a common kernel driver), and simply delete it after it is fully functional after reboot. Update: There is a good paper from Igor Korkin about hypervisor detection here.

SMM (System Management Mode) malware - Ring -2 rootkit

Somehow related to the previous type of attacks, but not many people know that System Management Mode can be used to inject code into the OS. Check the DEITYBOUNCE malware for more details ;) Also, abusing Intel Dual Monitor Mode (DMM) can lead to untrusted code execution, which basically monitors the SMM mode.

Intel® Active Management Technology - Ring -3 rootkit

According to Wikipedia, "Intel Active Management Technology (AMT) is hardware and firmware technology for remote out-of-band management of personal computers, in order to monitor, maintain, update, upgrade, and repair them". You can ask, what could possibly go wrong? See Alexander Tereshkin's and Rafal Wojtczuk's great research on this, or Vassilios Ververis thesis about AMT
As not many people click on links, let me quote the scary stuff about AMT:
  • Independent of the main CPU
  • Can access host memory via DMA (with restrictions)
  • Dedicated link to NIC, and its filtering capabilities
  • Can force host OS to reboot at any time (and boot the system from the emulated CDROM)
  • Active even in S3 sleep!

Other stuff

Create new user, update existing user, hidden admins

Sometimes one does not even have to add malicious code to the system, as valid user credentials are more than enough. Either existing users can be used for this purpose, or new ones can be created. E.g. a good trick is to use the Support account with a 500 RID - see here, Metasploit tool here.

Esoteric firmware malware

Almost any component in the computer runs with firmware, and by replacing the firmware with a malicious one, it is possible to start the malware. E.g. HDD firmware (see GrayFish again), graphic card, etc.

Hidden boot device

Malware can hide in one of the boot devices which are checked before the average OS is loaded, and after the malware is loaded, it can load the victim OS.

Network-level backdoor

Think about the following scenario: every time the OS boots, it loads additional data from the network. It can check for new software updates, configuration updates, etc. Whenever a vulnerable software/configuration update, the malware injects itself into the response, and get's executed. I know, this level of persistence is not foolproof, but still, possible. Think about the recently discovered GPO MiTM attack, the Evilgrade tool, or even the Xensploit tool when we are talking about VM migration.

Software vulnerability

Almost any kind of software vulnerability can be used as a persistent backdoor. Especially, if the vulnerability can be accessed remotely via the network, without any user interaction. Good old MS08-067...

Hardware malware, built into the chipset

I am not sure what to write here. Ask your local spy agency for further information. Good luck finding those!

More links

Tools I highly recommend:
For more information, check this blog post, part 1, part 2

Update 2017-04-29: A very nice list of Office persistence: https://labs.mwrinfosecurity.com/blog/add-in-opportunities-for-office-persistence/

Update 2017-10-23: Persistence via Security Descriptors and ACLs: https://www.youtube.com/watch?v=SeR4QJbaNRg

Update 2018-07-25: Backdooring LAPS https://rastamouse.me/2018/03/laps---part-1/
https://rastamouse.me/2018/03/laps---part-2/ 

I would like to thank to Gabor Pek from CrySyS Lab for reviewing and completing this post.

Related word


  1. Curso Hacking Gratis
  2. Kali Hacking
  3. Hacking Growth
  4. Hacking Tutorials
  5. Hacking Con Python
  6. House Hacking
  7. Capture The Flag Hacking
  8. Hacking Windows: Ataques A Sistemas Y Redes Microsoft
  9. Hacking Libro
  10. Funnel Hacking Live
  11. Como Empezar A Hackear
  12. Hacking Con Buscadores Pdf
  13. Hacking Movies

Monday, May 18, 2020

Evil Limiter: Taking Control Of Your Network Bandwidth







Ever wanted to block someone from the network or limit their bandwidth without having the network admin privileges? Well Evil Limiter has got you covered then.


An amazing tool to help you control your network without having access to the admin panel.

Today I'm gonna show you how to use this interesting tool to take control of your network.


Requirements:

1. A PC or Laptop with Linux OS.
2. A Network Adapter.
3. Access to the Network you want to control.
4. sudo or root access on your Linux OS.

First of all we will download the tool from its github repository:

https://github.com/bitbrute/evillimiter

You can download and extract the zip file from the link above or you can clone evillimiter repository using git like this:


git clone https://github.com/bitbrute/evillimiter 


Now lets install the downloaded tool on our machine

Step 1: Move inside the downloaded github repository

cd evillimiter


Step 2: To install type


sudo python3 setup.py install


wait for the installation to finish (May take some time)


Step 3: To run type


sudo evilimiter


Voila! That's it, you got it up and running on your machine


Now how do you control your network with it, its very easy.

It should detect your network automatically but yeah you can set it up manually as well using the command line argument -i.

After you have selected the right interface to control, you need to scan your network for live hosts. To perform the scan type


scan


you can pass an optional flag to the scan command which is range which will help you to specify the range of ip addresses you want to scan like this


scan --range 192.168.1.1-192.168.1.100





The above command will scan a total of 100 hosts from 192.168.1.1 to 192.168.1.100


Now after you have scanned your network next thing is to list the hosts that have been discovered during the scan for that you type the hosts command like this


hosts





Now you know the hosts on your network and now you should know which host you wanna block or limit based on the mac address of the host. Remember the host id of the host that you want to block or limit bandwidth of and lets do the magic.

to block a host from using the internet we simply specify the block command followed by the host id of the host that we want to block like this

block 1





if instead of blocking the host we just want to limit his internet bandwidth we can do just that by using the limit command followed by the host id and then the bandwidth that we want to allocate to that particular host like this


limit 1 100kbits





Wohooo! yeah its that easy and yes you can do all this without having the network admin role.

Now if you want to show mercy on that poor guy (blocked host), you can set him free by using the free command followed by the host id like this:

free 1





Well isn't administrating your network bandwidth so easy now.

Hope you enjoyed this tutorial.:)

Continue reading