You know in the beginning of MI:II where Tom Cruise throws his glasses and they explode after he see what his mission is? Well, I am looking to write some code (maybe even just an autoplay .bat file) that would delete or corrupt a file (or the entire CD) after it has been run.
The exact use I have in mind is this: I am creating a video, burning it to a CD (could be R or RW), and giving it to someone. Easy enough, but I only want them to be able to watch the video ONCE (assume they are running XP on a Dell E1505), and so I am looking for something that will prevent them from being able to watch it again. Whether this is a registry key created that disallows access to this particular CD, or a script that corrupts the video file in question, I have no idea. Even something that would forbid access to ALL CDs (or even just disable the CD-ROM drive) would work, because then I could just undo it myself.
Truth be told, I'm not totally sure where to start - or even if Python would be able to do what I'm looking for - and am just looking for some ideas. If I'm in the wrong place, a pointer in the right direction would be great; I'm just posting in the Python forum because it's the language I'm currently learning and thought this would be an interesting project to build toward (even if it is a little above my pay-grade at the moment).
Thanks in advance,
Chuck
Trying to create some Spy Code
Started by CharlesHutchsky, Sep 06 2008 09:50 AM
34 replies to this topic
#1
Posted 06 September 2008 - 09:50 AM
|
|
|
#2
Posted 07 September 2008 - 06:56 AM
After a little bit of trying to narrow down where I'm looking, I think there's two areas that I could influence that would result in what doing I'm looking for.
The computer
The CD
Personally, I don't really have any idea how I would create a self-corrupting file on a burned CD without using some sort of burning program to improperly overwrite the files. This would likely require running a CMD script or something that would automatically run burning software on my CD after the clip was finished in a pre-determined sequence. I don't think code that would accomplish this is within my grasp, especially to run it quickly enough that the user wouldn't be able to stop it.
My next option is to attack the computer itself (I'm testing it on my own before my friend's, so I don't really want anything that I can't reverse later). Off the top of my head, I can see doing this through altering the CD-drive's drivers, or creating some sort of registry key that identifies itself with the CD and, upon autoplay, sets the maximum run times for the video file to "1" (kind of like what commercial companies do when they provide trial software that they only want run a certain number of times before you buy it).
Does this get anyone else's gears churning?
The computer
The CD
Personally, I don't really have any idea how I would create a self-corrupting file on a burned CD without using some sort of burning program to improperly overwrite the files. This would likely require running a CMD script or something that would automatically run burning software on my CD after the clip was finished in a pre-determined sequence. I don't think code that would accomplish this is within my grasp, especially to run it quickly enough that the user wouldn't be able to stop it.
My next option is to attack the computer itself (I'm testing it on my own before my friend's, so I don't really want anything that I can't reverse later). Off the top of my head, I can see doing this through altering the CD-drive's drivers, or creating some sort of registry key that identifies itself with the CD and, upon autoplay, sets the maximum run times for the video file to "1" (kind of like what commercial companies do when they provide trial software that they only want run a certain number of times before you buy it).
Does this get anyone else's gears churning?
#3
Posted 07 September 2008 - 08:50 AM
You can't run an executable from a video file format unless you find an exploit, so this idea is going to fail. Unless you write an executable that contains your corrupter and is also responsible for launching the video. And without running the executable the video can't be run. However a lot of people aren't dumb enough to run an executable especially when they mean to watch a video.
#4
Posted 07 September 2008 - 09:19 AM
Okay, so for the sake of argument, let's assume they were dumb enough.
My primary goal is to put together something that accomplishes what I want it to do. I can always work on the tweaks (and social engineering :P) later once I've got the foundation down. My primary goal is this: "learn to design an autonomous package that renders itself unusable after being used". This is regardless of what the media may be, or how exactly it's done; I am using a video file as an example because I thought it would be a pretty cool application for it and might make for an interesting and worthwhile tutorial if I can figure it out.
Anyways, I struck upon your idea of using an executable to run both the file and the corrupter, setting a time delay on the executable (Batch file examples - Wait) for however long the video file was (plus a little more to take into account opening the media player of choice, etc.). Then, once the time limit was up (and the video file had played), the "self-corrupt" phase could be enabled and we're done.
Now, all I'm looking for is where to start. The executable that would run the video file is simple enough, and I'm sure I could figure out a way to set it up to auto-play (i.e. Autorun.inf Editor - Create Autoplay CDs - though I still need to look into how it works a little more). I think if I can figure those things out first we'll be off to a good start.
For now, I'm still moving into my house so I've got to go pick up some boxes I left at a friend's over the summer.
Cheers
My primary goal is to put together something that accomplishes what I want it to do. I can always work on the tweaks (and social engineering :P) later once I've got the foundation down. My primary goal is this: "learn to design an autonomous package that renders itself unusable after being used". This is regardless of what the media may be, or how exactly it's done; I am using a video file as an example because I thought it would be a pretty cool application for it and might make for an interesting and worthwhile tutorial if I can figure it out.
Anyways, I struck upon your idea of using an executable to run both the file and the corrupter, setting a time delay on the executable (Batch file examples - Wait) for however long the video file was (plus a little more to take into account opening the media player of choice, etc.). Then, once the time limit was up (and the video file had played), the "self-corrupt" phase could be enabled and we're done.
Now, all I'm looking for is where to start. The executable that would run the video file is simple enough, and I'm sure I could figure out a way to set it up to auto-play (i.e. Autorun.inf Editor - Create Autoplay CDs - though I still need to look into how it works a little more). I think if I can figure those things out first we'll be off to a good start.
For now, I'm still moving into my house so I've got to go pick up some boxes I left at a friend's over the summer.
Cheers
#5
Posted 07 September 2008 - 09:32 AM
Why would you use a batch file, they are complete and utter ****?
Just write a program in python or C or whatever that waits for the video to be over. Then have the program write random bits over the video part of itself or if the video is a separate file, basically you would be patching it.
That's all you need to do.
Just write a program in python or C or whatever that waits for the video to be over. Then have the program write random bits over the video part of itself or if the video is a separate file, basically you would be patching it.
That's all you need to do.
#7
Posted 07 September 2008 - 08:59 PM
.bat files are good for doing things that .bat files are designed for. i.e. Short and simple scripts that you don't want to repeat over and over. For the 1300+ asset network I was an admin for before I returned to school, we would frequently use .bat files to execute scripts for mass-installs and policy configuration among other things.
Anyways, I know *what* I have to do, but what I don't know is *how* to do it. I am now looking for the library of code, the syntax and the commands I would be using to complete this prokect. At this point in time, my expertise remains in working with all forms of media (and related software), network management, hardware assembly/management, and user assistance. Want to set up some DHCP, print, exchange, and offline storage servers (along with the rest of the usual suspects), all managed through a central administrative console along with appropriate network security protocols? I'm your man. Code a self-deleting CD? Hopeless. That's why I came here.
I am *not* fluent with coding in any language (other than HTML, ActionScript, and some cmd-line scripting), and am only beginning to learn python, so I don't really know where to start in terms of what you are saying I should do. What would help is an example of code (in whatever language) that would "write random bits of information over the video part" if you know how to do it.
Anyways, I know *what* I have to do, but what I don't know is *how* to do it. I am now looking for the library of code, the syntax and the commands I would be using to complete this prokect. At this point in time, my expertise remains in working with all forms of media (and related software), network management, hardware assembly/management, and user assistance. Want to set up some DHCP, print, exchange, and offline storage servers (along with the rest of the usual suspects), all managed through a central administrative console along with appropriate network security protocols? I'm your man. Code a self-deleting CD? Hopeless. That's why I came here.
I am *not* fluent with coding in any language (other than HTML, ActionScript, and some cmd-line scripting), and am only beginning to learn python, so I don't really know where to start in terms of what you are saying I should do. What would help is an example of code (in whatever language) that would "write random bits of information over the video part" if you know how to do it.
#8
Posted 08 September 2008 - 04:00 AM
.Bat are worthless for almost everything at this point. I'm don't much feel like getting in to it with you about all of your 'talents', although that is really nothing spectacular.
However, I'm in class right now, but when I get home I'll put some code together for you. It will probably be in C++.
However, I'm in class right now, but when I get home I'll put some code together for you. It will probably be in C++.
#9
Posted 08 September 2008 - 05:34 AM
Each to their own.
I was just illustrating that what might be easy for you in regards to this won't be for me because I haven't really gotten into it thus far; there's really no need to be condescending.
Looking forward to the code.
I was just illustrating that what might be easy for you in regards to this won't be for me because I haven't really gotten into it thus far; there's really no need to be condescending.
Looking forward to the code.
#10
Posted 08 September 2008 - 12:33 PM
Here is a C program that removes itself when run.
* You need the privileges to remove it.
#include "stdio.h"
int main(int argc, char ** argv){
remove(argv[0]);
}
* You need to have the path to the media to be removed.* You need the privileges to remove it.
#11
Posted 08 September 2008 - 08:44 PM
A start, thanks Aereshaa.
Only thing is that this package will be on a CD... will this still be able to modify the CD itself without use of any third-party burning software?
Also, I would assume that the privileges of the user would be the ones that are available to the program I write, no? The path shouldn't be a problem.
Only thing is that this package will be on a CD... will this still be able to modify the CD itself without use of any third-party burning software?
Also, I would assume that the privileges of the user would be the ones that are available to the program I write, no? The path shouldn't be a problem.
#12
Posted 09 September 2008 - 07:37 AM
Dude it's a program it doesn't matter what media it's stored on.


Sign In
Create Account


Back to top









