Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss. print.

In the first article, Steganography Part 1, we learned that we can make a secret encoding of data. Part 1 showed us how to embed a plain text (un-encrypted) inside a bitmap file and read it back. Now, we will learn a more advance technique in improving our steganographic wisdom. And this second article will teach us how to embed a compiled visual foxpro .fxp or .exe inside a bitmap. Please download and extract the zip file that comes with this article.

Using hidecode.exe, you can write the binary code of a visual foxpro .fxp file inside a bitmap. Note that the size should be smaller than the the BMP including the header definition of a bitmap. Below is a workflow of it.

Basically, after the .fxp is written, the bitmap may look like this. Since some of the bitimage is written, some pixels of the image would change in color depending on the data written.

Finally, you can call the code using the following command:


The workflow is shown below.

Below are screen shots showing us the target bitmaps and result after steganography is applied on them.
Filename: mz.bmp (original)

Apply steganograpy using HIDECODE.EXE.

Using hidecode.exe, you can write the binary code of a visual foxpro .fxp file inside a bitmap and the result of the bitmap would look like this.

Well, do you see the difference? The difference is shown below. The binary code of hello.fxp becomes an image which are pixels. See the difference.

And now here's the (partial) difference in Hex Dump.

To execute the code inside the .BMP, you can invoke it with this code:


And this will popup a message ‘Hello World’. You could also embed a compiled .exe. note that it should be visual foxpro .exe since the calling used is a DO. Thus if you want to embed other exe or perhaps run a script of .vbs you should call the start.exe to run the associated file for it.

Have Fun!
- Mz. (I dedicate this article to my wife 'Scarlet')

Download code
Click here to download the code that is discussed in this article. The download is a zipfile. Its size is 89,273 bytes.


Mz David has been programming the Fox since 1999. He graduated as a mathematician in 1996. David's main line of business is POS (Point of Sale) and Inventory Systems. He has developped different POSWares in C, Progress, Delphi, FoxDOS 2.6, Clipper and VFP. David currently is the head of the development department of his company Applied Ideas.


haejosh haejosh @ 4/27/2018 4:19:14 AM

Your Name: 
Your Feedback: 

Spam Protection:
Enter the code shown: