@Bucio: RT @alenarcia: Vendo iPhone 4S $5000 :) plis RT @TuxRecomienda @chiapatuit http://t.co/GhcIxpkL9n

Archivos de ‘bash‘

 
 

Escaneo Básico de puertos utilizando FLAGS

Seguido del documento el cual Alejandro Hernández  (a.k.a s0n 0f g0d nitr0us) me  compartió referente a  ami duda, sobre cómo saber, si un puerto esta encendido o apagado;

“ESCANEO BÁSICO DE PUERTOS UTILIZANDO FLAGS TCP”
Autor: nitr0us 

Les recomiendo una leída para desempolvar algunos conocimientos básicos, después de la leída opte por hping una herramienta que se me hizo muy completa, nos permite crear y analizar paquetes TCP/IP y también nos permite crear unos ataques.

hping is a command-line oriented TCP/IP packet assembler/analyzer. The interface is inspired to the ping(8) unix command, but hping isn’t only able to send ICMP echo requests. It supports TCP, UDP, ICMP and RAW-IP protocols, has a traceroute mode, the ability to send files between a covered channel, and many other features.
http://www.hping.org/

Con la asesoría de nitr0us, pude crear un pequeño script, el cual simplemente verifica si esta abierto o cerrado mediante un IF  usando un regex de comparación … :

 

#!/bin/bash
pingche=$(hping3 127.0.0.1 -p 1337 -S -c 1)
if [[ $pingche =~ .?SA.? ]] ; then
echo Puerto en linea
echo que siga la fiesta
else
echo "No lo esta"
fi

flags=SA → SYN/ACK → Abierto
flags=RA → RST/ACK → Cerrado

Negociación en tres pasos o Three-way handshake

Negociación en tres pasos o Three-way handshake

Mi otra opción era usar nmap, pero me gusto más hping.
Saludos.

ROT13

La ofuscación mediante ROT13, me recuerda la era medieval (y a un libro de dan brown el código da vinci):

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm

Con “tr” podemos (aparte de pasar de minúsculas a mayúsculas) rotarlo 13 posiciones (ROT13), de igual forma con ROT47 este ya utiliza algunos caracteres ASCII, con una serie de números que van del 0 al 127. Visto en ASCII, el ROT13 cubre los códigos 65–90 y 97–122: las letras mayúsculas y minúsculas, respectivamente. En cambio, el ROT47 emplea 94 caracteres, desde ! (el signo de exclamación, código ASCII 33) a ~ (la tilde, código ASCII 126), rotándolos con un desplazamiento de 47.

[ root 04:02:04 ~ //] $ echo "oLa Ke Ases" | tr a-z n-za-m #ROT13
bLn Kr Afrf
[ root 04:06:54 ~ //] $ echo "bLn Kr Afrf" | tr a-z n-za-m 
oLa Ke Ases
[ root 04:10:24 ~ //] $ echo "oLa Ke Ases" | tr '!-~' 'P-~!-O' #ROT47
@{2 z6 pD6D
[ root 04:17:34 ~ //] $ echo "@{2 z6 pD6D" | tr '!-~' 'P-~!-O'
oLa Ke Ases
[ root 04:17:48 ~ //] $ 

Peace

hexdump

[ rafael ~] $ echo "oLa ke Ase" | hexdump #hexadecimal
0000000 4c6f 2061 656b 4120 6573 000a          
000000b
[ rafael ~] $ echo "oLa ke Ase" | hexdump -d #octal
0000000   19567   08289   25963   16672   25971   00010                
000000b
[ rafael ~] $ echo "oLa ke Ase" | hexdump -C 
00000000  6f 4c 61 20 6b 65 20 41  73 65 0a                 |oLa ke Ase.|
0000000b
[ rafael ~] $ 

Backup Script


#!/bin/sh 
# 
#Make the image 
mkisofs -o /home/BACKUP.iso /source/mybackupdir/ 

#Burn the image to a DVD. 
growisofs -dvd-compat -Z /dev/dvd=BACKUP.iso 

#Burn the image to a CD. 
cdrecord --scanbus 
cdrecord -v dev=1,0,0 -speed 8 driveropts=burnfree fs=32 -eject BACKUP.iso 

Then obviously create a CRON to do this when you want……

5 0 * * fri /path/to/script.sh 

Patterns for searching

. Matches single character.
* Wild character Example C* if found would pull up CC or CAT…
{} Matches any character contained within the bracket.
^ Represents the beginning of the line, so if you did ^T it would search for any sentence starting with a T.
$ Represents the end of the line, so if you did $. then it would pull up any lines that ended with .
\ Means to take the next character serious so you could search for C\ C.

Note: Be careful using the characters $, *, [, ^, |, (, ), and \ in the pattern list because they are also meaningful to the shell. It is safest to enclose the entire pattern list in single quotes ‘… ‘.


Campus Party

Publicidad