Showing posts with label password. Show all posts
Showing posts with label password. Show all posts

Sunday, 19 August 2012

LMMC header on DLink router file, decoding the zlib zpipe Plaintext password

LMMC header on router file, decoding.

Inspired from http://www.koshatul.com/

Tested on a DLink DSL-G604T

Downloading the config file dumps a config.bin file.  The first line of the file has a LMMC which indicates a zlib header

Convert the file to a .Z file
dd if=config.bin of=test.config.bin.z bs=20 skip=1


download the zlib source and extract it.  http://zlib.net/zlib-1.2.7.tar.gz
go to the examples folder
compile zpipe.c using the command
gcc -o zipe zpipe.c -lz
now you will have something called zpipe

copy the zpipe command where the config files are and execute the command
./zpipe -d < test.config.bin.z > config.txt

now open config.txt and view it plaintext!



WindyCityTech Blogger
WindyWindyCityTech Wordpress

linux password basics 101 notes

full source:  http://www.linuxjournal.com/content/hack-and-password-cracking-gpus-part-i-setup

passwords are encrypted into a hash and are stored in /etc/shadow

To look in the shadow file, type in a terminal sudo cat /etc/shadow


user:$id$salt$hash:otherCrap

look at 'man shadow' for the full definition.

The hashes are delimited by the $ sign in this format
$id $salt $encrypted


Where $id 1 = MD5  5 = SHA-256   6 = SHA-512

Also look here for more info http://www.cyberciti.biz/faq/understanding-etcshadow-file/

WindyCityTech Blogger
WindyWindyCityTech Wordpress

Changing a linux password, recovering

ref: http://www.youtube.com/watch?v=CLwqGce6AGo

Boot into a shell as root
type 'e' at the grub menu
change the line "ro quiet splash" TO "rw init=/bin/bash"
press CTRL-D to boot

search for home directory to find the username
confirm username by cat /etc/passwd
type 'passwd USER'
type in new password & confirm
type sync
reboot


another option is to boot from a live CD, mount the hard drive (sudo fdisk -l) and edit a character in the /etc/passwd file.
user:x:1000:1000:user,,,:/home/user:/bin/bash
to
user:x:1000:1000:user,,,:/home/user:/bin/bash
umount and reboot

login without a password.  Put a password in by typing
'passwd user'
then
sudo shadowconfig off
sudo shadowconfig on


WindyCityTech Blogger
WindyWindyCityTech Wordpress

compiling crunch 3.3 in ubunut and mint, error in Makefile

Found on Ubuntu forums here

Modify the makefile under build: crunch mode the $? to the left as shown.


val:    crunch.c

    @echo "Building valgrind compatible binary..."

    $(CC) $? $(VCFLAGS) $(LFS)  -o crunch

    @echo "valgrind --leak-check=yes crunch ..."

    @echo ""

crunch: crunch.c

    @echo "Building binary..."

    $(CC) $? $(CFLAGS) $(LFS)  -o $@

    @echo ""


Also note that crunch default install is /pentest/passwords/crunch  you may want to change the location in the make file to suit.


WindyCityTech Blogger
WindyWindyCityTech Wordpress

Saturday, 25 June 2011

DOB wordlist generation script

Here is a script on how to make a list of dates between X and Y in the format of DDMMYYYY

Great for bruting.  Nice 8 character numeric.

Source http://adaywithtape.blogspot.com/2011/03/creating-date-wordlist.html

#!/bin/bash
#
#
# Create a wordlist based on dates in the format
# ddmmyyyy
# date doesnt seem to like certain dates before 1940..
# so test as from 1941 ;)
#
# Although the input needs to be yyyy-mm-dd
# the output with the below script will be ddmmyyyy
# Its slow and suppose it would be quicker if it wasnt
# 'teed' to screen, but what else are you gonna stare at..
#
echo "Enter the starting date"
echo "must be in the format yyyy-mm-dd"
(tput bold && tput setaf 1)
read START_DATE
(tput sgr 0)
echo "Enter the ending date"
echo "must be in the format yyyy-mm-dd"
(tput bold && tput setaf 1)
read END_DATE
(tput sgr 0)
# List all dates in between the above dates

echo $START_DATE | tee r_dates.txt
while true
do
START_DATE=$( date +%Y-%m-%d -d "$START_DATE -d 1day" )
echo $START_DATE | tee -a r_dates.txt
if [ "$START_DATE" == "$END_DATE" ]
then
awk -F- '{print $3 $2 $1}' r_dates.txt > datelist.txt
rm r_dates.txt
(tput bold && tput setaf 1)
echo "wordlist 'datelist.txt' created"
(tput sgr 0)
exit
fi
done






WindyCityTech Blogger
windywindycitytech wordpress

Friday, 24 June 2011

Crunch Tutorial - Featuring a day with tape

Crunch is a great word generator.  It allows you to make customizable word lists.

It is a free download on sourceforge.

The complete bible for crunch is here: http://adaywithtape.blogspot.com/


source: adaywithtape.blogspot.com




WindyCityTech Blogger
windywindycitytech wordpress