Nov 28, 2011

Hide a image in other image


In the last post talking about steganography, previous post to complement good now let me explain how to hide one image inside another image

Well first we need a shell and wirte the next

cat your_image >> your_another_image



if we see in the header file is see what kind and see JFIF that means is a jpg file



if we see in the header of the other file see what kind and see PNG that means is a PNG file


And we see in the end of file see the file end "END" all the image png  begin and end with "PNG" and "END"

This case caught my attention because we can see in the end of the file exit a message of wikipedia


And if wee see the change in the image jpg appear in the end of the file the word END  and previously PNG

The steganography can have different use then i show you other method  like a LSB and other 

I recommend this program of steganography use LSB method work in ubuntu 

sudo apt-get install steghide  

Greetings i hope you liked :D


Nov 27, 2011

Encryption wep

Hi in the class the operating system we are seeing the security i decided show you how to crack encryption wep because i think is important know the vulnerability of the algorithms

I use my connection for this example and i need change the WPA to WEP for this example in other case i'll show you how to crack a WPA

See the Wikipedia definition Wired Equivalent Privacy (WEP)

I use backtrack 5 and in this case the suit of aircrack-ng

Now we need write on the shell airmon-ng 

Then wee see our interface in my case is wlan0


Now write in the shell 

airmong-ng wlan0 start

Now our interface is on monitor mode

Then write on the shell airodump-ng mon0 and you see the EDDID available


Then write airodump-ng -w wep -c channel  --bssid  your-bssid mon0 

Then we need inject traffic write in another shell

aireplay-ng -1 0 -a bssid mon0


In another shell write airplay-ng -3 -b bssid mon0


In another shell write  aircrack-ng wep-01.cap

In the next image see in the shell KEY FOUND



Greetings i hope you liked :D

Nov 24, 2011

Steganography the EoF method

Steganography the EoF method

In this post i explain how to hide a text inside of image with the EoF method (End of File)

Steganography in simple words is the art to hide a message or something is better you see the Wikipedia definition steganography

Now we see can hide a text inside the image

First we see the size of the file


Then write the next on the shell

echo "The message" >> file_name_of_the_file


Now see the how increase the size of the file


We can see the message doing cat on the shell see on the end of the file


We can see the message with Hex Editor see the below image


This is all is a simple method we can use hide text on a image.

Oct 31, 2011

Theoretical Presentation 2





Basic concepts.
What is a TLB?
The Translation Look-aside Buffer is where all the most recently used pages go, so when the memory management unit searches for a page, it searches first in this cache.

What is a page table?
This is the structure where it's stored the information about which virtual address correspond to a specific physical address.

What is a frame page?
A frame page is a space with a fixed size in the physical memory, usually the frame pages and the pages in the page table have the same size.

What does swapping means?
So let's imagine that our RAM has no space to allocate memory for another process, so instead of deleting a page frame and lost the data, the memory management unit stores a page frame in a hard drive and then assign the page frame to the new process. The partition where you store the page frames actually it's know as Virtual Memory on Microsoft Windows, in GNU/Linux this is called swap.


How Memory works:

Every process has a memory space, when a program is running uses virtual memory addresses that its translated into the real (physical) address.
If  the space needed it's too big, swap a page frame to disk (decide which with a LRU or FIFO algorithm).
When a process needs to access info in the memory:
-First extracts page number
-Exctracts offset
-check in TLB, translate virtual to physical address
-if not in TLB, trap to OS and add to TLB
-Get info that's in the physical page frame




Are there any other algorithm for swap out pages?
Yes, but before showing you other algorithms, you need to know which could be the optimal page replacement algorithm. This algorithm considers many pages to swap, every page it's going to be accesed at a determinated time, so the page A it's gonna be accesed at time 2, page D at time 3, page C at time 4, page and page B it's going to be accesed at time 6, for example, so the optimal algorithm choose the page with the longest time to be accessed and swap it out. In this example, the algorithm would have chosen the page B.


But there is a problem, we cannot predict the future, so we can't use this technique.
Based on the optimal algorithm, there are many others that try to be like it. We have::

  • Not Recently Used (NRU)
    • This algoritm divide the pages in four classes:
      • Class 0: Not Referenced, Not Modified
      • Class 1: Not Referenced, Modified
      • Class 2: Referenced Not Modified
      • Class 3: Referenced, Modified
    • It choose a random page that isn't empty from the lowest class to swap.
  • First In, First Out (FIFO)
    •  This one is explained above in the presentation.
  • Second chance
    • This is a modified version of FIFO, this algorithm checks if the page it's actually in use before it is deleted, if so, it goes to the end of the list and has a second chance.
  • Clock
    • This is kind of similar to second chance, but this one uses a circular linked list and there's a pointer that is showing which is the oldest page.
  • Least Recently Used (LRU)
    • This one is explained above in the presentation.
  • Not Frecuently Used (NFU)
    • This uses a counter, when a page is used increases its counter, so later it sees for the page with the lower counter and swap it.




You can view the presentation here