-
coding/scripts
Ok, to start off, I am trying to learn programming etc. by reading a few books. Now the real question...I have noticed that people post scripts in the forums (not just here) that show how vulnerabilities or patches to programs. The problem is, I dont know how to tell which program (c++ vb etc) that it should be compiled in. I also thought, maybe the scripts that are being written are to be executed in Linux (something else I am learning). Any easy way to tell?....and no, Im not trying to "hack" anything, I just think it would be great to really use some open source programs and even be able to write my own....would be great if they started teaching programming with my comp science degree.....only a few more months till that. Thanks
-
Well, to tell the differences in language you need to know some basic syntax of each language. As for what operationg system it compiles and runs on, for me i just look at the code and you can usually tell by what file systems it modifies or if it includes any OS specific header files or packages.
But just as a cardinal rule dont cut, paste and run any code that you dont know what it does. especially if it is an exploit. Because you could really jack up your OS.
-
I think that for the most part people post what prog language there code is written in and what platform it runs on. Maybe I just haven't been noticing anything lately. A lot of times if you just see one piece of code in a language and memorize it and what language it came from, it is pretty easy to tell which prog language most things are written in.
They all seem to be pretty distinct to me. As for platform, just use java, it is platform independent.
-
The majority of exploit code is wirtten in c for the *nix platform
-
This is mostly a "me to" for kr4y3's post, but there are a couple of extra points that I'd like to add.
1) Most exploits don't actually work out of the box. This is to prevent 3v1l, clueless crackers from using them. Usually it's a trivial change to get them working.
2) I've posted quite a bit of code to various forums, and much of it is for communications purposes only. That is to say, it has not been tested, and is there just to convey the general idea of a program. Often, this is written in pseudocode, which is not in any language in particular.
-
Quote:
Originally posted here by j3r
...............This is to prevent 3v1l, clueless crackers...........
heheh 3v1|
-
Just to comment on what S3cur|ty4ng31 wrote, the coding in c, you cant just run the code in linux correct, you need to have C installed on the box? Sorry if im sounding stupid....
-
You have to have a compiler such as gcc, http://gcc.gnu.org
although that is not the only option, I'm sure that is what almost everyone here uses and it will suit you just fine
-
Another side-note to mention, going along with the don't cut and paste idea....
Most code that you do cut and paste...probably won't work on your box. A lot of code carries system sensitive variables, in that, most of them are customized to work on someone else's box. You'll find that out when you try to compile them, and then get the, "Line 3, char 5 undefined variable" when you go look at the line 3 it will have "' 'Insert something here" :)
Another important thing to mention, is that some code is meant specifically for a certain *NIX variant. Meaning that Redhat code, may not work with FreeBSD (this all depends if you are allowed to run Linux binaries in BSD...and even then its sketchy).
After awhile you'll begin to notice elemental differences in between different programming languages, its much like spoken languages...in that Russian sure don't look like English. Much the like, C sure don't look like ASM :)
Have fun, and happy learning!
-
I am smelling a RAT, if he is "learning" programming then why DOESN'T HE KNOW ANYTHING(syntax)LANGUAGE.......
I rest my case........R.I.P.
-
From what I've seen most 'sploits etc., are written in either perl or C/C++
If the first line is an include file it's C/C++, if it's a path to an interperetor it's gunna perl.
-
if you know the file extension than you can usually determine what language it is written in. ie. *.c is c, *.cpp is c++, *.java is java, *.pl is perl, *.sh is a bash shell script
-
Thanks for the help guys/gals....and to shut HANDzCLEANx up, no, im not a "rat" as you call it, I am taking computer science in college, and fyi, I DO have some programming skills.....now please, dont make an a$$ out of yourself when someone is really trying to learn....