Saturday, December 20, 2008

Request For Family Status

NBSTEGO - bash script for steganography

I do not know why, but I dedicated myself to changing
BrutalStego
, I wrote, since a new bash script, which is really a text steganography, the crypt
AES256
and hides it in hexadecimal vector file.

The thing that interested me was to encrypt text, hide it and be able to detect with password entry, in short, a steganography tool online!

Instruments used: grep, awk, dd, bc, wc, xxd, openssl

basically works like this: you insert the name of the vector file, you insert the name of the new file (the one containing the secret message), insert and finally the message is part of the password.Dopo these inputs, the special software in the OpenSSL AES256 encrypts the secret message, then convert it to hex and places it in the new vector file.
I tested on JPG and MP3 on and you do not notice any disruption.
By raising the little program, you can go to reveal the secret message by entering the name of the vector file and password
Here's the script:


# / bin / bash #

NBStego - by Nanni Bassetti -
http:// www.nannibassetti.com

-
nannib@libero.it


# a simple steganographic tool for Linux. Tested on JPG, MP3, AVI
# It uses AES256 algorithm by openssl


hid () {


echo "Insert the message to hide:"

read read fl echo "Insert the file name of the new file: " read nfl echo" Insert your password: "read pw
# here it crypts the plain text in text by cyphered aes25 and save it into steg.bin
openssl aes-256-cbc-in pText-out bar- .'m
# password length
lenpw = $ (expr length "$ pw")
lenpw_mod = $ (echo 0 + 10 count=$lenpw_mod
# temp2.bin is a 10 bytes file filled of zeroes to store the secret message length
dd if=$fl of=temp2.bin bs=1c skip=$lenpw_mod count=10
# temp2.bin is the end of the new file
dd if=$fl of=temp3.bin bs=1c skip=$(echo $lenpw_mod + 10 > $nfl
rm temp1.bin
rm temp2.bin

rm temp3.bin
rm steg.bin rm steghex.bin rm ptext rm l.bin echo " "
echo " -------------------------- "
echo " "


}
#-----End Hide-----



reveal ()
{
echo "Insert the file name containing the secret message:"
read nfl
echo "Insert the password:"
read pw
lenpw=$(expr length "$pw")
lenpw_mod=$(echo 0 + 10 if=$nfl skip=$lenpw_mod bs=1c count=10 read case $ answ1
answ1 in
1) hid;;
2) reveal;;
*) echo "Wrong answer! Write 1 or 2 "
echo" ";
esac exit



Click here to DOWNLOAD



Saturday, December 6, 2008

Freckles On Inside Of Cheek

Linux Live distro but how many I bring?


We are now in 2009, everything has evolved, everything is fast and powerful, but the Italian Justice?
That remains slow, very slow, there are cases started in 1998, which have yet to finish and maybe still require expert opinions. How
equip?
We could be faced with if not 286 Intel 386 machines without USB ports, no CD-ROM without BIOS that can boot from a CD-ROM, with very little RAM, the only positive thing was the size of the hard disk found in it, that would probably be a few megabytes.


Sometimes, even the machines 'modern', can have problems of incompatibility with Linux Live distro, because here we are, of course, talking about using a live, for various reasons, and not to detach the hard disk and connect to our workstations, which would be the best solution to address each issue.


So good in our backpack expert information should not be missing anything, according to my personal classification, as a live distro:


HIGH LEVEL
- Boot from CD-ROM, ideal for modern systems, with excellent graphical interfaces.


Helix 2,


CAINE,

FCCU 12.1
,

ForLex
,
Deft 4.1




MEDIUM
- boot from CD-ROM - are lighter and can run without a GUI.



FCCU
11 or 10,
FIRE

,


IRItaly
,
PHLAK
,

Knoppix-STD,
DSL



LOW
- boot from floppy - floppy disk and start turn on the computer dinosaurs ,

mulinux
,
Floppix


also would not hurt to always carry your cd

GParted
and a rescue cd such as Trinity


,
SystemRescueCd and linux net-oriented
as BackTrack.
Too? ;) Well I am convinced that in the other comments will appear

Monday, December 1, 2008

Dishwasher Rattling Sound

Anti-Forensics

I just finished reading an interesting article on Mark Whitteker ISSA Journal, that summarizes some basic techniques of anti-forensics, I find this kind articles very constructive, why do not they say anything new, but serve to bring together and synthesize the concepts, which is useful, particularly in an area so rich in techniques to remember.


What is anti-forensics? It's all those escamotages, serving to embarrass the "digital

investigators" in order to be able to hide or make it very awkward retrieval of digital evidence.


types of anti-forensics can be divided into three main branches:

Data Hiding (hiding data) Tool's weakness (known weaknesses of the tools for computer forensics) Investigator's weakness (weakness investigator)


hiding data

Data can be hidden in many ways, not only on the hard disk in question, but also on Web sites of storage,

here you can find a discussion of Mario Pascucci on some techniques, but let us consider the most common and well known: Encryption Encrypt


entire volumes or only file, may be the most easy to implement, but it becomes one of the toughest obstacles for the digital investigator because an encryption with AES (Advanced Encryption Standard) 128 bit 128 has 2 possible keys with a brute force attack does not come to anything, except in a very long time (we're talking years) constant and parallel processing.

So in this case, the investigator agrees that, look for the password in other ways, such as check in system memory (ram dumping) any password entered, if there is some readable file, having a log of a Any pre-installed key-logger or a profiling of the suspect, but attempts are really tied to hope and luck, for example, if the password is a possible word, maybe just a dictionary attack and the chest opens ;.


: - P Steganography

From ancient Greek "hidden writing", is a known technique for hiding information in other binary files, including pictures, mp3 files, etc..

Personally, I developed a small instruments for teaching purposes, which may be understood as a trivial steganography:

BrutalStego
or a more complex with

NBSTEGO . There are many tools for steganography as: JHide,


Digital Invisible Ink and many more that you can read here

.
systems to see if a file contains steganography are based on probabilistic algorithms, in fact often give false positives and false negatives, none of this can be useful to the investigator, unless they have found traces of steganography programs on the PC of the suspect, otherwise it becomes a hunting blind.


  • Unallocated space and secure deletion


  • This is the space not occupied by active files, because when a file is deleted from the system, the fact remains physically in a space marked as "unallocated" therefore available to write another file.
Clearing standard serves only to eliminate the pointer to the file from the File Allocation Table (FAT) or Master File Table (MFT).
With computer forensics tools, you can recover deleted files (advertising occult

FUNDL or SFDUMPER

), but if you fill up before deleting files or careatteri random zeros at the end you can not recover more than the original file.

SLACK SPACE



The files are saved when they are allocated in clusters, groups of sectors on the disk, but if a file occupies clusters 5 and a half is allocated into six clusters, leaving half free cluster. There are tools like Metasploit's Slacker

utility that allow you to write in the slack space, that space that is advancing in a cluster, then if you encrypt the file and insert it in the slack space, the investigator may be drawn with deception, finding only the data that seem to trash previous file allocated in that cluster, when it is an encrypted file.

TOOL'S Weakness Other anti-forensics techniques, can exploit bugs or reside in the known weaknesses of the most popular tools for computer forensics. The

ADS (Alternate Data Streams)
, no longer a threat. The

MD5 collision, ie you can edit a file and to be the same MD5 hash of the original file, this can serve to hide a file and claim it as a file known, when the investigator performs a search using matching the MD5 hash of a dictionary of known about the files contained on the disk in question.


Changing the Timestamp

with this technique you can trick the tools that create a timeline based on the time of MAC (Modify, and Create Access file).
The manipulation of the magic number and file extension , this technique is quite disturbing to the investigators, because if you change only the extension of a file, for example, from JPG to DOC programs carving ( Foremost, Photorec, Scalpel, etc.). and programs such as "file" or "TridNet, realize it, because we consider the headers and footers file (in the case of JPG and FFD9 FFD8 are in hex), but if you also change the headers and footers, you cheat, even this tool, so it made a thorough inspection and manual!
LA investigator's Weakness
This is, in my opinion, the technique more problematic, it is condensed into a simple concept, ie the time and resources that must employ an investigator to analyze the media seized. Just have several gigabytes or terabytes of disks, Raid, use techniques for hiding data and then tests to be conducted via lead many resources in terms of time and money, forcing the investigator to work at large. This is a reflection that I had asked many times when I read all the techniques "for" anti-forensics, I often wondered:

"But if a technical consultant to analyze receives 10-100 250GB hard drive one, how can get up to work on every hard disk, checking for encryption, steganography, slack space, hidden files in the spaces between MBR and partition start, hidden partitions, file systems inside the file system, etc.. etc..? "


Conclusions


I think it's useful to know more about possible methods of hiding data, but always believe in the motto "it is easier to conceal than discovering"

Nanni Bassetti