Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Embedding Inside Images?


ghost's Avatar
0 0

I'm fairly new on the scene, but please don't judge me by my progress on the challenges. Now that I've got that out of the way, I'm wondering if it is possible to embed mini-programs in to an image file. For example , say you wanted to log people's IP address when they executed the image file, or set a variable on a remote server , such as how many times it has been viewed…etc. I know that people embed things inside of .mp3s and movies, so it is just a thought. If anyone can point me in the right direction , I would appreciate it.

I'm KickMe by the way, Im New here, so what's up?


ghost's Avatar
0 0

Yes, yes it is. Not technically programmes but a script yes.


ghost's Avatar
0 0

Has anyone made an article about that? i think it would be quite interesting. Also, what languages could it be done in? javascript? php? binary (like compiled C++)?…


ghost's Avatar
0 0

Intresting, by scripts do you mean that it would have to be interpted by the browser? I can somewhat program in c++.

EDIT:

Just a thought, but in order to display the image, the computer has to interpet the code, correct? So what is to say , that you can't execute code? Like Assembly or Something? Please stop me, If i start to sound to noobish.


ghost's Avatar
0 0

Unfortunatly no, because assembly/c are compiled, and so cannot be executed unless compiled in to an executable. Scripts (php/perl) are executed by the server without being compiled, so they can be embedded in to files and interpreted as they are read, making them ideal for this purpose.

And no, you're not sounding noobish.


n3w7yp3's Avatar
Member
0 0

Well, sorta. You can imbed VBScript in an image (to an extent and this usually requires the use of an ActiveX control). That would only effect Windows boxen, because *nix boxen don't share a common imbeded API with the browser.


ghost's Avatar
0 0

Not n00bish at all. :O seem to know more than me :/


ghost's Avatar
0 0

I don't know any PHP yet , but I'm going to look in to this somemore, I will post if I make any progress ;)

EDIT:

Something just came to me, what if you made a "script" and when executed it displayed an Image, while processing the actual script, and (just guessing) but you could trick the browser in to describing it as an image,( mouse over link would say image.gif , same for address bar).

What do you think?


ghost's Avatar
0 0

A lot of people do things like this. They're simply dynamic images. Make a PHP script using GD libary or ImageMagick. It first does what you tell it, (database queries, records information, etc,) then displays the image.

You can have it use a .gif extension through mime types, or use internal mime types within a script to fake an extension.