The project is comprised of 3 modules:
- The embedding Module which is written in Ruby
- The Execution/ exploiting stage
- The IMP Scanner, to scan for Images with Malicious Programs (IMP)
For the embedding the following are the stages:
- Generate malicious program (malp.exe) using msfpayload from metasploit
- encode the generated program (malp.exe) using msfencode from metasploit
- obfuscate malp.exe using UPX or any other suitable packer like Themida to make sure it is not detected by antivirus.
- embed malip.exe into selected stegoimage (stegoimg.jpg) using F5 algorithm (for transform domain steganography) or Jsteg (for spatial domain steganography). the size of the image should be more than double the size of malp.exe to be safe and to ensure no distortion occurs.
Deploy the image to the target machine. Many possible ways of doing this including keydrops with manipulated autorun.inf file to extract malp from stego or passive propagation via FTP shared folder and then later activation/triggering.
Scanning tool was developed using Python. The IDE was PyDev in Eclipse Helios (for C and C++ by default) after adding on the needed files from the Eclipse Marketplace. GUI design was done using QtDesigner which saved the files as .ui extensioned files. QtDesigner came with PyQt4. To convert the .ui files to .py, use the pyuic4 command to do this.
For the scanning procedure:
- Opt to scan either an entire directory or a single image
- steganography algorithms to be targeted are JSteg and F5
- Opt for quick scan or slow scan (in-depth)
Quick Scan:
- Load list of images into QListWidgetItem and create a list object for them also
- Check the EXIF headers of the images for markers regarding the steganography algorithm used. In some cases, the developer may add their name to the first few bytes of the stegoimage as a signature of sorts.
- Run the Chi-Square attack on the images one by one to see if it has had data embedded into it using steganography. Eliminate the ones without the steganography markers/artefacts from the QListWidgetItem.
- If the stegoimage is found to have used JSteg from EXIF header analysis, use the Jsteg tool to extract the data from the image since no password is used. If it's F5, the best option would be to run a dictionary attack on the image using the F5 tool and common default passwords.
- submit the image hash to Virustotal as well as the hash for the extracted program/tool. Get the results and display.
- display results of the scan and allow the user to see individual details for each scanned image.
Slow Scan:
- Run the stages of quick scan
- Submit each image to cuckoo sandbox
- run/execute all image viewing programs in the sandbox to try and see if any activity occurs besides simple opening of the file. this is to check if any of the programs can be exploited into extracting the malicious program from the image.
- do the same tests for any extracted data from the images.
- Display results and allow printing of report of all the findings.
Comments
Post a Comment