Sponsor Advertisements help keep UGN Security Online.
Sponsor Advertisements help keep UGN Security Online.
Want to earn prizes for clicking online advertisements? Join Rewards1.com.
|
|
|
#10103 - 08/29/03 03:42 AM
Buffer Overflow Attacks
|
UGN Super Poster
Registered: 06/16/03
Posts: 807
Loc: Wisconsin
|
Whats a buffer overflow attack, what does it speciffically do, and how is it executed?
|
|
Top
|
|
|
|
Sponsor Advertisements help keep UGN Security Online.
Sponsor Advertisements help keep UGN Security Online.
|
|
#10104 - 08/29/03 05:03 AM
Re: Buffer Overflow Attacks
|
nobody
Registered: 03/02/02
Posts: 815
Loc: Ann Arbor
|
A buffer is an allocated space of temporary memory. A buffer overflow is when too much data is recieved causing the buffer to overflow. To understand how they work you'll need to know some uP(microprocessor) theory. But basically you want to offerflow the buffer and have the part is left over an instruction, usually a malicious instruction that would grant you certain privledges on this system. This part that is overflows is the next set of instructions to execute instead of what should normally be executed.
|
|
Top
|
|
|
|
#10105 - 08/29/03 05:17 AM
Re: Buffer Overflow Attacks
|
UGN Super Poster
Registered: 06/16/03
Posts: 807
Loc: Wisconsin
|
how would i execute one; is it a program or do i connect to a port to do it
|
|
Top
|
|
|
|
#10106 - 08/29/03 06:08 AM
Re: Buffer Overflow Attacks
|
Member
Registered: 08/28/03
Posts: 240
Loc: New Zealand
|
I think you are talking about exploits. there are two general kinds of exploits local and remote. Remote exploits use the internet to send a payload to a certain service to overflow it and execute code.. While a local service will do the same but not remotely.. simple really.. A buffer overflow works as said above by writing more data then the buffer allowed.. hence "buffer" overflow an example in c is. #include int main(int argc,char *argv[]){ char *buff[20]; strcpy(buff,argv[1]); } Now when you run the program "c:\lala.exe AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" more data is written to the buffer then was allocated and the registers get overwritten if your in windows a error box will pop up and you can find out which registers you overwrote by looking for 41 which is the hex value of "A" it should overwrite the esp and ebp if you have enuf data seeing as how the buffer is 20 bytes and you wrote more than 21 bytes u overwrite the register why did i say 21 well thats because of the null terminated byte every buffer has '\0' (thats a basic explanation of it all) How do exploits work.. they do just that they overflow buffers and execute shellcode (ahh what is shellcode?) shellcode is opcode(operation code) of an asm program an example . #include #include
void main() {
LoadLibrary("msvcrt.dll");
__asm {
mov esp,ebp push ebp mov ebp,esp xor edi,edi push edi sub esp,04h mov byte ptr [ebp-08h],63h mov byte ptr [ebp-07h],6Dh mov byte ptr [ebp-06h],64h mov byte ptr [ebp-05h],2Eh mov byte ptr [ebp-04h],65h mov byte ptr [ebp-03h],78h mov byte ptr [ebp-02h],65h mov eax, 0x77c28044 //put your system() address here push eax lea eax,[ebp-08h] push eax call dword ptr [ebp-0ch] } } this program just runs cmd.exe using the system function and when u convert this to opcode you have your shellcode.. to get the system address you just use a debugger to find out where the function is stored in memory Ok thats shellcode.. you understand buffer overflows well the simple version.. So now we make an exploit what this does is overwrite the return address of the program so when it tries to return it executes or shellcode.. there is no easy way to explain this.. but basically you store your shellcode in public memory range 0x00000000 to 0x7FFFFFFF and overwrite the stack with your shellcodes memory address and execute it. Voila just google for buffer overflow tutorials for a more in depth idea of what they are
_________________________
The wise make mistakes, the fools repeat them ---------------------------------------- When you have eliminated the impossible, that which remains, however improbable, must be the truth
|
|
Top
|
|
|
|
#10107 - 08/29/03 12:30 PM
Re: Buffer Overflow Attacks
|
UGN News Staff
Registered: 11/29/02
Posts: 1146
Loc: Canada
|
heres a good txt file by a member of the german group called The Hackers Choice (THC) thc.org heres the link to the good read, hope this helpes you on ur way of learning Its on Stacks Overflow's http://www.thc.org/papers/OVERFLOW.TXT
_________________________
Good artists copy, great artists steal.
-Picasso
|
|
Top
|
|
|
|
#10109 - 08/30/03 09:03 AM
Re: Buffer Overflow Attacks
|
UGN News Staff
Registered: 11/29/02
Posts: 1146
Loc: Canada
|
np, glad to help +++EDITED+++ heres another OK txt file i found on packetstorm its called: Writing buffer overflow exploits - a tutorial for beginners and the link is: http://packetstormsecurity.nl/papers/unix/exploit.txt Hope this one helps like the last one hopefully did
_________________________
Good artists copy, great artists steal.
-Picasso
|
|
Top
|
|
|
|
#10111 - 08/30/03 02:08 PM
Re: Buffer Overflow Attacks
|
UGN News Staff
Registered: 11/29/02
Posts: 1146
Loc: Canada
|
heres yet another great txt file Advanced buffer overflow exploits http://www.zone-h.org/files/32/aboep.txt
_________________________
Good artists copy, great artists steal.
-Picasso
|
|
Top
|
|
|
|
#10113 - 08/31/03 08:39 AM
Re: Buffer Overflow Attacks
|
UGN Super Poster
Registered: 06/16/03
Posts: 807
Loc: Wisconsin
|
|
|
Top
|
|
|
|
#10114 - 08/31/03 07:01 PM
Re: Buffer Overflow Attacks
|
Member
Registered: 08/28/03
Posts: 240
Loc: New Zealand
|
NTD Depends if they have error checking for the usernames buffer.. but there was a MS ftp vulnrability which allowed people to remotely exploit MS ftp servers because they didnt have buffer checking and of course all the exploit had to do was send a tcp stream "USER (buffer gets printed here)" and your shellcode should be executed :p but of course remember seeing as how its remote you also have to store the shell code in there memory sumwhere But i belive u can store your shellcode b4 u overwrite the esp and ebp registers and make them execute the USER buffer's address and that should load your shellcode.. but you would have to find a way to find the address all the time.. i'm not good with remote attacks.. never had to make one..
_________________________
The wise make mistakes, the fools repeat them ---------------------------------------- When you have eliminated the impossible, that which remains, however improbable, must be the truth
|
|
Top
|
|
|
|
#10115 - 09/01/03 11:25 PM
Re: Buffer Overflow Attacks
|
UGN News Staff
Registered: 11/29/02
Posts: 1146
Loc: Canada
|
hehe Black ur one 1337 guy = ) Heres another pretty good one Writing buffer overflow exploits - a tutorial for beginners http://www.zone-h.org/files/32/buffer_overflows_for_newbies.txt
_________________________
Good artists copy, great artists steal.
-Picasso
|
|
Top
|
|
|
|
#10116 - 09/02/03 07:52 PM
Re: Buffer Overflow Attacks
|
Member
Registered: 08/28/03
Posts: 240
Loc: New Zealand
|
lol thanks.. i don't consider myself "1337" im just learning like the rest, but i just seem to be ahead atm.. everyone can bring forward a different aspect to a project.. like games; they have 20 different people some for algorithims some for gui's etc.. But i appreciate the comment :p
_________________________
The wise make mistakes, the fools repeat them ---------------------------------------- When you have eliminated the impossible, that which remains, however improbable, must be the truth
|
|
Top
|
|
|
|
|
Registered: 03/01/02
Posts: 505
|
|
2198 Members
46 Forums
24778 Topics
59948 Posts
Max Online: 1567 @ 04/25/10 10:20 AM
|
|
|
1 registered (Gremelin),
338
Guests and
210
Spiders online. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|