Connect with our team of offensive security, AI security and pen testing experts at Black Hat Europe 2023. Learn More

Connect with our team of offensive security, AI security and pen testing experts at Black Hat Europe 2023. Learn More

Services
Capture
Managed Detection & Response

Eradicate cyberthreats with world-class intel and expertise

twi-cloud-lock-color-svg
Managed Security Services

Expand your team’s capabilities and strengthen your security posture

twi-briefcase-color-svg
Consulting & Professional Services

Tap into our global team of tenured cybersecurity specialists

twi-dashboard-color-svg
Penetration Testing

Subscription- or project-based testing, delivered by global experts

twi-database-color-svg
Database Security

Get ahead of database risk, protect data and exceed compliance requirements

twi-email-color-svg
Email Security & Management

Catch email threats others miss with layered security & maximum control

twi-managed-portal-color
Co-Managed SOC (SIEM)

Eliminate alert fatigue, focus your SecOps team, stop threats fast, and reduce cyber risk

Solutions
BY TOPIC
Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
The Trustwave Approach
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Platform
SpiderLabs Fusion Center
Security Operations Centers
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
SpiderLabs Blog

Steganalysis, the Counterpart of Steganography

In my last blog post I discussed the art of embedding secret messages in any file so that only the sender and the receiver know about the presence of that message. This is called steganography. In this post I will write about the information security discipline that tries to discover this kind of messages.

Steganalysis is the counter part of steganography and it is defined as the art or science of discovering hidden data in cover objects. The people who works in this discipline are called steganalysts

Nowadays, a lot of different techniques have recently appeared in steganalysis but they can be generally summarized by 3 branches:

  1. "Chi-square" Methods: The chi-square attack is a statistical test to measure if a given set of observed data and an expected set of data are similar or not. The original version of this attack could detect sequentially embedded messages and was later generalized to randomly scattered messages.

  2. Distinguishing Statistic Methods: In this approach, the steganalyst first carefully inspects the embedding algorithm and then identifies a quantity (the distinguishing statistics) that changes predictably with the length of the embedded message. The detection philosophy is not limited to any specific type of the embedding operation and works for randomly scattered messages as well. One disadvantage of this approach is that the detection needs to be customized to each embedding paradigm and the design of proper distinguishing statistics cannot be easily automatized.

  3. Blind Classifier Methods: First, a blind detector needs to learn what a typical, unmodified image looks like from multiple perspectives. Then, a classifier is trained to learn the differences between an unmodified image and a stegoimage (an image that has been modified). This methodology combined with a powerful classifier gives very impressive results.

It is really important to mention that the job of a steganalyst is to detect if there is a secret message hidden in a digital file. It is not their job to recover the secret message.

There are many different methods for detecting if an image has been modified. One of the easiest ones is developed by using the idea that cameras doesn't use all the different colors in the nature. Cameras approximate some of the colors to a near color so they don't need to manage a big amount of different values in the color palette. For example, let's assume that we have a grey-scaled image with grey intensities from 0 to 255, it is easier to use only half of those values by rounding the odds values to the next even number.

Figure 1 shows the histogram for an image using this value compression method. An image histogram is a graphical representation of the number of pixels in an image as a function of their intensity. You can notice that there are values which never appears in the image, those are the ones that are rounded to another value for managing a smaller color palette.

9927_72a5bed2-d7f2-4a66-8ca9-89bac0fc2b34

Figure 1. Image histogram from a camera image.

Figure 2 shows the histogram for the same image after hiding a message. We can see that now there are more different values in the color palette. This happens because when we use a LSB steganographic method, we modify the last bit of every pixel, so the values that were not used in the original color palette appears in the histogram of the modified image.

11295_b222e63f-0d36-48ed-8dc0-97bd9b1ce1ac

Figure 2. Image histogram from a camera image after embedding a secret message

So, we can know if this kind of image has been modified simply by checking the histograms.

While this has been just a brief introduction to steganalysis, it is a very deep and fascinating discipline. If you want to know a little more just leave a comment and I will reply you as soon as possible.

Latest SpiderLabs Blogs

The 2023 Retail Services Sector Threat Landscape: A Trustwave Threat Intelligence Briefing

The annual holiday shopping season is poised for a surge in spending, a fact well-known to retailers, consumers, and cybercriminals alike. The latter group, however, is poised to exploit any...

Read More

Pwning Electroencephalogram (EEG) Medical Devices by Default

Overall Analysis of Vulnerability Identification – Default Credentials Leading to Remote Code Execution During internal network testing, a document was discovered titled the “XL Security Site...

Read More

Hidden Data Exfiltration Using Time, Literally

I was looking at my watch last week and my attention was moved towards the seconds over at the right of the watch face, incrementing nicely along as you’d expect. Now, I don’t know if I’d just spent...

Read More