Buffer Overflows: Why, How and Prevention

Buffer Overflows: Why, How and Prev

Buffer Overflows: Why, How and Prevention"

Nicole LaRock Decker

In November 1988 an incident occurred that caught the attention of the entire networked
community - the Internet Worm. The Internet Worm brought down more than 6000 sites by a
rights .
little-known exploit called the buffer overflow [1]. Pretty powerful, huh? To this date, buffer
overflows are still being found in a variety of software in a variety of operating systems. They are a serious threat to any system or network administrator's well-being. It is a problem that has
been around for way too long and needs to be seriously addressed. This paper focuses on why
full
buffer overflows are still around today, how they work, and provides a list of some ways to help
prevent and protect. retains

After the Internet Worm, we didn't hear much about buffer overflows again until the mid to late
'90s when a series of documents were published and released on the 'Net. They were:
1. "Smashing The Stack For Fun and Profit" written by "Aleph One," published in the
Phrack magazine in November of 1996. Author
2. also released in 1997.
"How to Write Buffer Overflows" by "Mudge" released in 1997.
3. "Stack Smashing Vulnerabilities in the UNIX Operating System" by Nathan P. Smith.
In each of these papers, several items were addressed2002, - what a buffer overflow is, how they work,
4. "The Tao of Windows Buffer Overflows" by "DilDog," April of 1998.

how to find one, how to create one and each- paper even provided sample code for gaining root access to a system once an overflow was2000found. The first three papers concentrated on buffer overflows in the UNIX operating system. The last paper focused on buffer overflows in the

Windows operating environment. So, in a matter of a year and a half, critical information in exploiting holes in 2 majorInstituteoperating systems was released. Today, there are even more articles
on the 'Net talking about the ins and outs of buffer overflows, allowing attackers to get even more perspectives on the exploit. However, it was the release of these first few papers that really caught the attention of system and network administrators as well as attackers looking for ways into systems and networks.

The existence of the SANS above documents could help explain why buffer overflows have been so

popular within the last few years. To get an idea of the abundance of buffer overflows, let's look at the number of vulnerabilities involving buffer overflows from 1998 to the present, November 2000. The following© numbers are derived from research I conducted based on information from the CERT Coordination Center (CERT/CC), Common Vulnerabilities and Exposures (CVE), and Security Focus web sites. Searching for the term "buffer overflow" in the title or description of the CERT/CC Advisories returned the following. Of the 1998 CERT/CC advisories, 7 out of 13 advisories were due to buffer overflows, about 54%. In 1999, there were 9 out of 17, about 53%, and in this year, 2000, there have been 2 of 19 thus far, about 11%. So, in 1998 and 1999 over half the advisories were due to buffer overflows - an astounding amount. The fact that there has been a significant reduction for the year 2000 raises some eyebrows. Even though the year isn't over, it still raises some questions. Are buffer overflows finally going down on the list of top





© SANS Institute 2000 - 2002 As part of GIAC practical repository. Author retains full rights.

security holes? Are attackers finding other, possibly easier, ways of gaining control of systems? Are there fewer programs susceptible to buffer overflows? Is software code being written more securely? We'll have to wait for the statistics over the next couple of years to find out for sure.

The CVE database, which was started in September of 1999, contains 1077 entries, as of November 2000. Conducting a search for "buffer overflow" in the descriptions of all. 1077 entries returned 312 vulnerabilities, about 29%.

Doing a keyword search of "buffer overflow" in the Security Focus advisoriesrightsfound 93 in 1998, 161 in 1999, and 106 for 2000 thus far. This is consistent with the CERT/CC advisories. There

questions can be asked as to the cause of this decline from 1999 to 2000.fullThe interesting point though is that, within the last few years, buffer overflows are still found in high numbers. Even though they have been around since the Internet Worm in 1988, they are still, based on the
was a growth from 1998 to 1999 and then a decrease from 1999 to 2000. Again the same types of

root access to a system, they are consequently one of the most retainslethalexploits. They have been found in many platforms, especially UNIX and Windows based platforms, and have affected a
numbers given above, one of the most common exploits. Since most buffer overflows result in

Internet Explorer, Microsoft Internet Information Server,Authorftp, imap, bind, pine, lpr, sendmail, X Windows, ssh, and the list goes on and on.

wealth of applications such as, in the case of the Internet Worm, fingerd, Microsoft NetMeeting,



To help understand these exploits, let's look at how buffer overflows occur. The method we will be describing below is a type of buffer overflow commonly referred to as "stack smashing." To comprehend how stack smashing occurs, we first need to understand a little bit about buffers and
instruction pointers. Consider the gas tank in your car. If you have a 15 gallon tank, you can at
2002,
most fit 15 gallons of gasoline in it. That's your- buffer size. If you try to put 17 gallons in it,
you've overflowed the tank and wasted your money. The same concept can be applied to
variables within a program. For example, 2000 say a program requires input from the user that is



does not check that this amount has been exceeded, he or she has overflowed the buffer. Since
programmed to be a maximum of 256 bytes. There is a spot reserved in the computer's memory (a buffer) to store these 256Institutebytesor less. If the user inputs more than 256 bytes and the program There is another buffer in the computer's memory that stores the memory address of the next
the computer needs a place to put these extra bytes, it generally puts them in a neighboring spot, overwriting what was already there.


command to execute. This is called the instruction pointer. Continuing our example above, after reading the user's input, the next statement might be to print it to the screen. The instruction
pointer would have as it's contents the memory address of this print statement. The computer
gets the input fromSANSthe user, stores it in the buffer, checks the instruction pointer to find what to
execute next, finds© the memory address of the print statement, retrieves the contents of the input
buffer, and finally prints the user's input to the screen.

Now, putting the two together, if an attacker were able to overflow the buffer so that it modified the return address of the instruction pointer in such a way that it pointed to the attacker's code, they could do some clever things. And that is exactly what happens. The attacker overflows the buffer so that the memory address for the instruction pointer is the memory address of, in most cases, the function to execute /bin/sh. When the program finishes the part of the program that overflowed the buffer, it finds the address for /bin/sh in the instruction pointer and executes it.

0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
Tràn bộ đệm: Tại sao, như thế nào và công tác phòng chống "

Nicole LaRock Decker

vào tháng 11 năm 1988 một vụ việc xảy ra mà bắt gặp sự chú ý của toàn bộ mạng
cộng đồng - Internet sâu. Con sâu Internet đã mang xuống các trang web hơn 6000 bởi một
quyền.
gọi là ít được biết đến khai thác lỗi tràn bộ đệm [1]. Khá mạnh mẽ, hả? Vào ngày này, đệm
tràn vẫn được tìm thấy trong một loạt các phần mềm trong một loạt các hệ điều hành. Họ là một mối đe dọa nghiêm trọng cho bất kỳ hệ thống hoặc quản trị viên mạng của hạnh phúc. Nó là một vấn đề có
khoảng cách quá dài và cần phải được giải quyết nghiêm túc. Bài báo này tập trung vào lý do tại sao
đầy đủ
tràn bộ đệm là vẫn còn xung quanh hôm nay, làm thế nào họ làm việc, và cung cấp một danh sách một số cách để giúp
ngăn chặn và bảo vệ. giữ lại

sau khi Internet sâu, chúng tôi không nghe nhiều về tràn bộ đệm một lần nữa cho đến khi các giữa đến cuối
' những năm 90 khi một loạt các tài liệu được xuất bản và phát hành trên các ' Net. Họ đã:
1. "Đập ngăn xếp cho niềm vui và lợi nhuận" viết bởi "Một Aleph," xuất bản trong các
Phrack tạp chí trong tháng 11 năm 1996. Tác giả
2. cũng phát hành vào năm 1997.
"Làm thế nào để viết bộ đệm tràn" bởi "Mudge" phát hành vào năm 1997.
3. "Ngăn xếp các lỗ hổng đập trong hệ điều hành UNIX" bởi Nathan P. Smith.
Trong mỗi của các giấy tờ, một số mặt hàng đã là addressed2002, - những gì một lỗi tràn bộ đệm là, làm thế nào họ làm việc,
4. "Tao Windows bộ đệm tràn" bởi "DilDog," tháng 4 năm 1998.

làm thế nào để tìm thấy một, làm thế nào để tạo ra một và mỗi-giấy thậm chí cung cấp mẫu mã để đạt được gốc truy cập vào một hệ thống một lần một was2000found tràn. Lần đầu tiên ba bài báo tập trung vào tràn bộ đệm trong hệ điều hành UNIX. Giấy cuối cùng tập trung vào bộ đệm tràn trong các

Windows hoạt động môi trường. Vì vậy, trong một vấn đề của một năm rưỡi, Các thông tin quan trọng trong khai thác lỗ hổng trong 2 majorInstituteoperating hệ thống đã được phát hành. Hôm nay, có rất nhiều hơn bài
trên các ' Net nói về các ins and outs của tràn bộ đệm, cho phép kẻ tấn công để có được nhiều hơn quan điểm về việc khai thác. Tuy nhiên, đó là việc phát hành của các giấy tờ vài đầu tiên thực sự bắt gặp sự chú ý của người quản trị hệ thống và mạng cũng như những kẻ tấn công tìm cách vào hệ thống và mạng.

sự tồn tại của SANS tài liệu trên có thể giúp giải thích tại sao tràn bộ đệm đã là như vậy

phổ biến trong vài năm qua. Để có được một ý tưởng về sự phong phú của tràn bộ đệm, Hãy nhìn vào số lượng lỗ hổng liên quan đến bộ đệm tràn từ năm 1998 đến nay, tháng 11 năm 2000. Sau © số có nguồn gốc từ nghiên cứu tôi thực hiện dựa trên thông tin từ Trung tâm phối hợp CERT (CERT/CC), lỗ hổng phổ biến và tiếp xúc (CVE) và các trang web bảo mật tập trung. Tìm kiếm thuật ngữ "lỗi tràn bộ đệm" trong tiêu đề hoặc mô tả của tư vấn CERT/CC trở về sau. Trong tư vấn CERT/CC 1998, tư vấn 7 / 13 là do tràn bộ đệm, khoảng 54%. Năm 1999, có 9 trong số 17, khoảng 53%, và trong năm nay, năm 2000, đã có 2 19 vậy, đến nay, khoảng 11%. Vì vậy, trong năm 1998 và 1999 hơn một nửa các tư vấn là do tràn bộ đệm - một số lượng đáng kinh ngạc. Một thực tế rằng đã có một giảm đáng kể cho năm 2000 làm tăng một số lông mày. Mặc dù năm không phải là hơn, nó vẫn còn làm tăng một số câu hỏi. Là bộ đệm tràn cuối cùng đi xuống trong danh sách đầu trang



© SANS viện năm 2000-2002 như là một phần của kho lưu trữ thực tế đình. Tác giả vẫn giữ đầy đủ quyền.

lỗ hổng bảo mật? Những kẻ tấn công tìm kiếm khác, có thể dễ dàng hơn, cách của giành quyền kiểm soát của hệ thống? Có ít hơn các chương trình dễ bị tràn bộ đệm? Phần mềm mã được viết an toàn hơn? Chúng tôi sẽ phải chờ đợi cho các số liệu thống kê trên các cặp vợ chồng tiếp theo của năm để tìm cho chắc chắn.

The CVE cơ sở dữ liệu, được bắt đầu vào tháng 9 năm 1999, chứa mục 1077, tính đến tháng 11 năm 2000. Tiến hành một tìm kiếm cho "lỗi tràn bộ đệm" trong các mô tả của tất cả. 1077 mục trở về lỗ hổng 312, về 29%.

Doing một từ khoá tìm kiếm của "lỗi tràn bộ đệm" trong an ninh tập trung advisoriesrightsfound 93 vào năm 1998, 161 năm 1999, và 106 cho 2000 vậy, đến nay. Điều này là phù hợp với tư vấn CERT/CC. Có

câu hỏi có thể được yêu cầu là nguyên nhân của sự suy giảm này từ năm 1999 để 2000.fullThe thú vị điểm mặc dù là rằng, trong những năm gần đây, tràn bộ đệm được vẫn còn tìm thấy số lượng cao. Mặc dù họ có khoảng từ sâu Internet vào năm 1988, họ Tuy nhiên, dựa trên các
là một sự tăng trưởng từ năm 1998 đến năm 1999 và sau đó giảm từ năm 1999 tới năm 2000. Một lần nữa cùng loại của

gốc truy cập để một hệ thống, họ là do đó một trong những retainslethalexploits. Họ đã được tìm thấy trong nhiều nền tảng, đặc biệt là UNIX và Windows dựa trên nền tảng, và đã ảnh hưởng một
số nhất định ở trên, một trong các khai thác phổ biến nhất. Kể từ khi hầu hết bộ đệm tràn dẫn đến

Internet Explorer, Microsoft Internet thông tin máy chủ, Authorftp, imap, ràng buộc, pine, lpr, sendmail, X Windows, SSH, và danh sách đi và về.

sự giàu có của các ứng dụng chẳng hạn như, trong trường hợp của Internet sâu, fingerd, Microsoft NetMeeting,


để giúp hiểu các khai thác, hãy nhìn vào như thế nào xảy ra tràn bộ đệm. Phương pháp chúng tôi sẽ mô tả dưới đây là một loại lỗi tràn bộ đệm thường được gọi là "stack đập." Để hiểu làm thế nào ngăn xếp đập xảy ra, chúng tôi lần đầu tiên cần phải hiểu một chút về bộ đệm và
hướng dẫn con trỏ. Xem xét việc bình xăng trong xe của bạn. Nếu bạn có một bồn chứa 15 gallon, bạn có thể ở
2002,
hầu hết phù hợp với 15 gallon xăng trong nó. Đó là kích thước bộ đệm của bạn. Nếu bạn cố gắng đưa 17 gallon trong đó,
bạn đã tràn xe tăng và lãng phí tiền của bạn. Khái niệm tương tự có thể được áp dụng cho
biến trong một chương trình. Ví dụ, 2000 nói một chương trình yêu cầu đầu vào từ người sử dụng là


không kiểm tra rằng số tiền này đã bị vượt quá, em đã tràn bộ đệm. Kể từ khi
lập trình để là tối đa 256 byte. Có được một chỗ dành riêng trong bộ nhớ của máy tính (một bộ đệm) để lưu trữ 256Institutebytesor ít hơn. Nếu người dùng độc hơn 256 byte và chương trình có là một bộ đệm trong bộ nhớ của máy tính mà các cửa hàng địa chỉ bộ nhớ của tiếp theo
máy tính cần một nơi để đặt các byte thêm, nó thường đặt chúng trong một lân cận tại chỗ, ghi đè lên những gì đã có đó.


lệnh để thực hiện. Điều này được gọi là con trỏ hướng dẫn. Tiếp tục ví dụ ở trên, sau khi đọc đầu vào của người dùng, các báo cáo tiếp theo có thể là in ra màn hình. Các chỉ dẫn
con trỏ sẽ có vì nó là nội dung địa chỉ bộ nhớ của tuyên bố in này. Máy tính
được người sử dụng đầu vào fromSANSthe, Mua sắm trong các bộ đệm, kiểm tra con trỏ hướng dẫn để tìm những gì để
thực hiện tiếp theo, thấy © địa chỉ bộ nhớ của các báo cáo in, Lấy nội dung của các đầu vào
đệm, và cuối cùng chạm khắc người sử dụng của đầu vào để màn hình.

bây giờ, đặt hai lại với nhau, nếu một kẻ tấn công đã có thể tràn bộ đệm để cho nó sửa đổi địa chỉ trả lại con trỏ hướng dẫn trong một cách mà nó chỉ tới những kẻ tấn công mã, họ có thể làm một số điều thông minh. Và đó là chính xác những gì sẽ xảy ra. Những kẻ tấn công tràn bộ đệm để địa chỉ bộ nhớ cho con trỏ hướng dẫn là địa chỉ bộ nhớ, trong hầu hết trường hợp, các chức năng để thực hiện/bin/sh. Khi chương trình kết thúc một phần của chương trình tràn bộ đệm, nó tìm thấy địa chỉ cho/bin/sh trong con trỏ hướng dẫn và thực hiện nó.

đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
Buffer Overflows: Why, How and Prevention"

Nicole LaRock Decker

In November 1988 an incident occurred that caught the attention of the entire networked
community - the Internet Worm. The Internet Worm brought down more than 6000 sites by a
rights .
little-known exploit called the buffer overflow [1]. Pretty powerful, huh? To this date, buffer
overflows are still being found in a variety of software in a variety of operating systems. They are a serious threat to any system or network administrator's well-being. It is a problem that has
been around for way too long and needs to be seriously addressed. This paper focuses on why
full
buffer overflows are still around today, how they work, and provides a list of some ways to help
prevent and protect. retains

After the Internet Worm, we didn't hear much about buffer overflows again until the mid to late
'90s when a series of documents were published and released on the 'Net. They were:
1. "Smashing The Stack For Fun and Profit" written by "Aleph One," published in the
Phrack magazine in November of 1996. Author
2. also released in 1997.
"How to Write Buffer Overflows" by "Mudge" released in 1997.
3. "Stack Smashing Vulnerabilities in the UNIX Operating System" by Nathan P. Smith.
In each of these papers, several items were addressed2002, - what a buffer overflow is, how they work,
4. "The Tao of Windows Buffer Overflows" by "DilDog," April of 1998.

how to find one, how to create one and each- paper even provided sample code for gaining root access to a system once an overflow was2000found. The first three papers concentrated on buffer overflows in the UNIX operating system. The last paper focused on buffer overflows in the

Windows operating environment. So, in a matter of a year and a half, critical information in exploiting holes in 2 majorInstituteoperating systems was released. Today, there are even more articles
on the 'Net talking about the ins and outs of buffer overflows, allowing attackers to get even more perspectives on the exploit. However, it was the release of these first few papers that really caught the attention of system and network administrators as well as attackers looking for ways into systems and networks.

The existence of the SANS above documents could help explain why buffer overflows have been so

popular within the last few years. To get an idea of the abundance of buffer overflows, let's look at the number of vulnerabilities involving buffer overflows from 1998 to the present, November 2000. The following© numbers are derived from research I conducted based on information from the CERT Coordination Center (CERT/CC), Common Vulnerabilities and Exposures (CVE), and Security Focus web sites. Searching for the term "buffer overflow" in the title or description of the CERT/CC Advisories returned the following. Of the 1998 CERT/CC advisories, 7 out of 13 advisories were due to buffer overflows, about 54%. In 1999, there were 9 out of 17, about 53%, and in this year, 2000, there have been 2 of 19 thus far, about 11%. So, in 1998 and 1999 over half the advisories were due to buffer overflows - an astounding amount. The fact that there has been a significant reduction for the year 2000 raises some eyebrows. Even though the year isn't over, it still raises some questions. Are buffer overflows finally going down on the list of top





© SANS Institute 2000 - 2002 As part of GIAC practical repository. Author retains full rights.

security holes? Are attackers finding other, possibly easier, ways of gaining control of systems? Are there fewer programs susceptible to buffer overflows? Is software code being written more securely? We'll have to wait for the statistics over the next couple of years to find out for sure.

The CVE database, which was started in September of 1999, contains 1077 entries, as of November 2000. Conducting a search for "buffer overflow" in the descriptions of all. 1077 entries returned 312 vulnerabilities, about 29%.

Doing a keyword search of "buffer overflow" in the Security Focus advisoriesrightsfound 93 in 1998, 161 in 1999, and 106 for 2000 thus far. This is consistent with the CERT/CC advisories. There

questions can be asked as to the cause of this decline from 1999 to 2000.fullThe interesting point though is that, within the last few years, buffer overflows are still found in high numbers. Even though they have been around since the Internet Worm in 1988, they are still, based on the
was a growth from 1998 to 1999 and then a decrease from 1999 to 2000. Again the same types of

root access to a system, they are consequently one of the most retainslethalexploits. They have been found in many platforms, especially UNIX and Windows based platforms, and have affected a
numbers given above, one of the most common exploits. Since most buffer overflows result in

Internet Explorer, Microsoft Internet Information Server,Authorftp, imap, bind, pine, lpr, sendmail, X Windows, ssh, and the list goes on and on.

wealth of applications such as, in the case of the Internet Worm, fingerd, Microsoft NetMeeting,



To help understand these exploits, let's look at how buffer overflows occur. The method we will be describing below is a type of buffer overflow commonly referred to as "stack smashing." To comprehend how stack smashing occurs, we first need to understand a little bit about buffers and
instruction pointers. Consider the gas tank in your car. If you have a 15 gallon tank, you can at
2002,
most fit 15 gallons of gasoline in it. That's your- buffer size. If you try to put 17 gallons in it,
you've overflowed the tank and wasted your money. The same concept can be applied to
variables within a program. For example, 2000 say a program requires input from the user that is



does not check that this amount has been exceeded, he or she has overflowed the buffer. Since
programmed to be a maximum of 256 bytes. There is a spot reserved in the computer's memory (a buffer) to store these 256Institutebytesor less. If the user inputs more than 256 bytes and the program There is another buffer in the computer's memory that stores the memory address of the next
the computer needs a place to put these extra bytes, it generally puts them in a neighboring spot, overwriting what was already there.


command to execute. This is called the instruction pointer. Continuing our example above, after reading the user's input, the next statement might be to print it to the screen. The instruction
pointer would have as it's contents the memory address of this print statement. The computer
gets the input fromSANSthe user, stores it in the buffer, checks the instruction pointer to find what to
execute next, finds© the memory address of the print statement, retrieves the contents of the input
buffer, and finally prints the user's input to the screen.

Now, putting the two together, if an attacker were able to overflow the buffer so that it modified the return address of the instruction pointer in such a way that it pointed to the attacker's code, they could do some clever things. And that is exactly what happens. The attacker overflows the buffer so that the memory address for the instruction pointer is the memory address of, in most cases, the function to execute /bin/sh. When the program finishes the part of the program that overflowed the buffer, it finds the address for /bin/sh in the instruction pointer and executes it.

đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2025 I Love Translation. All reserved.

E-mail: