Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 10-23-2010, 08:17 PM   #1
Beta Member
Join Date: Oct 2010
Posts: 2
Default Question about executables Hex Editors

Most executable files i open up in my hex editor have a bunch of special characters and alphanumeric characters that to me at least, do not make any sense. Then there are portions of the file that are stored as plain text. Can anyone explain whats going on there for me? the only thing i can think of is some kind of code obfuscation.


scratch416 is offline   Reply With Quote
Old 10-24-2010, 11:55 AM   #2
Site Team
berry120's Avatar
Join Date: Jul 2009
Location: England, UK
Posts: 3,434
Default Re: Question about executables Hex Editors

Not code obfuscation, but code. When code is compiled you don't get the plain text in the code's language stored, you get a low level representation of a machine language. It's this code (that will make little sense unless you know exactly what you're looking for) that will form the majority of the file. Literal strings in the code are usually stored as literal strings that you can read in a hex editor, unless the code's been obfuscated - hence the importance of not storing confidential literal strings directly in executables! It's those literals that you'll see every so often scattered around the file.

Save the whales, feed the hungry, free the mallocs.
berry120 is offline   Reply With Quote
Old 10-25-2010, 04:25 AM   #3
Site Team
root's Avatar
Join Date: Mar 2004
Posts: 8,096
Default Re: Question about executables Hex Editors

you need to think about the operations that are being performed.

then you need to consider that there is a standard instruction set for a chip, and there are hex codes that do certain things.

for example, when you have a simple operation, Add two numbers together.

you need to think abut how this is done, you have input, process, output.

there will be quiet a few operations for this, all around get input from memory, store data in the accumulator on the chip device, perform operations on the data stored in acc (addition), then store result, get result display result.

all the chip operations are actually just binary codes, which are presented to us usually in HEX, and often we give then their ASCII charectors as well, so you may well see a small heart symbol, but that's actually an instruction to get some data from a memory location, followed by a number to specify that memory location.

you're seeing plain text, because the text is stored in plain text.

so what you're actually seeing is a command (push the following data to the console output) (data is Hello world).

instruction sets for devices are freely available online, so if you really want to see what that compiled code is doing, you can work it all out.
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 09:18 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0