Monday, November 8, 2010

XSS Vulnerability at blogspot.com - Google try to ignore?

I report to Google Security Team some days, but I have not received any reply from them, any fixes as well. They may think this is stuff, not problem. So the problem with whom?  Who may concerm?




I am still waiting for their reply. May be they will never concerm. 

Saturday, November 6, 2010

Xampp 1.7.3 multiple vulnerabilities

#**********************************************************
# Exploit Title: Xampp 1.7.3 XSS multiple vulnerabilities
# Date: 11/06/2010
# Author: Sangteamtham
# Software Link: http://www.apachefriends.org/en/xampp.html
# Version: 1.7.3
# Tested on: Windows 7
# Email: Sangteamtham@gmail.com
# Blog: http://sangte.blogspot.com/
# Homepage: http://hcegroup.net/hceteam
#***********************************************************

1.Description:

XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use - just download, extract and start.

2. Vulnerabilities:

http://paste2.org/p/1075584



3. Poc:



4. Patch:

Vender should filter the special characters when input the form.
Clients should set password access to xampp folder.

5. Credits:
Thanks flying to Vietnamese hackers and all hackers out there researching for more security.
*************************************************************

Google Shop Oline XSS vulnerability


     
1.  Discription:

 Google Shop Online website sell the products online like souvenir.
“ How do we keep your information secure?
    The personal information that you provide to Google Store, including your credit card or other payment information, is maintained on secure servers and protected by industry-standard Secure Socket Layer encryption. When entering personal information, look for an icon at the bottom of your browser window that indicates you are on a secure page.”
     I cut from that site.
URL: http://www.google-store.com
2.  XSS Vulnerability:
Cross-site scripting (XSS) is a type of computer security vulnerability typically found in web applications that enables malicious attackers to inject client-side script into web pages viewed by other users. An exploited cross-site scripting vulnerability can be used by attackers to bypass access controls such as the same origin policy. Cross-site scripting carried out on websites were roughly 80% of all security vulnerabilities documented by Symantec as of 2007.[1] Their impact may range from a petty nuisance to a significant security risk, depending on the sensitivity of the data handled by the vulnerable site, and the nature of any security mitigations implemented by the site's owner.” (wikipedia.org)
“What about cookies?
A cookie is a piece of data that identifies you as a unique user. When you visit the Google Store, we set a cookie on your computer to help identify you, customize your experience and maintain your account and order information. To protect the security of your account, you must accept the Google Store cookie in order to shop here.”( google-store.com)
    Here are some snapshops:

XSS vulnerability was on the module produc_info.php, that does not filter the special characters. Hackers use this to insert javascript code to steal cookies from Customers, Administrators and so on.
Take a look at the source view from firefox.



3.  Reference:

Friday, November 5, 2010

From 0x90 to 0x4c454554, a journey into exploitation.

 From 0x90 to 0x4c454554, a journey into exploitation.
In the last few weeks I have been diving deeper down the rabbit hole of exploitation work and with a bit of work and time to prepare myself for the long run I compiled a set of areas to study in a course type layout. I hope my research will help others spend more time learning and less time searching.
Because I am doing this myself I may have missed 1 or 2 things and along the way I will add in anything I find to help with process. So let us both get started...

First off I want to thank the corelan guys for the help they have provided me so far in the process. They have been there for me through my learning with knowledge and help. Thank you!

layout: I will be posting in a hierarchical structure, each hierarchy structure should be fully understood before moving on to the next section. I will also post sets of Parallel learning topics that you can use to study in line with other topics to help prevent monotony. These Parallel areas will have a start and end mark which shows when they should be complete in perspective to the overall learning
Here is a PDF of the course to help keep track and understand the layout. Course_layout.pdf
"New background soon -> desktop background Cheatsheet added to documents page Backgrounds

Other Posts like this one:
Because of quality of these two posts I wanted to put them at the top. I could not figure out where to put them in the list because they cover so much.
past-present-future of windows exploitation
smashing the stack in 2010(Great resource)


Part 1: Programming

Parallel learning #1:(complete this section before getting to the book "Hacking Art of exploitation")
While going through the programming area I concentrate on core topics to help us later on with exploit writing. One area that is very good to pick up is some kind of scripting language. Listed below are some of the most popular scripting languages and ones I feel will prove to be the most useful.

Python: One of my favorite languages and growing in popularity python is a powerful language that is easy to use and well documented.
Wikibooks Python
http://docs.python.org/
onlinecomputerbooks.com

Ruby: If you plan on later on working inside of metasploit this may be the language you want to start with.
Wikibooks Ruby
LittleBookOfRuby
onlinecomputerbooks.com

Perl: An older language that still has a lot of use perl is one of the highest used scripting languages and you will see it used in many exploits. (I would suggest python over perl)
[book] O'Reilly Learning Perl
onlinecomputerbooks.com


C and C++ programming:
It is very important to understand what you are exploiting so to get started let us figure out what we are exploiting. You do not need to go through all of these but when finished with this section you should have a good understanding of C and C++ programming.
Cprogramming.com
http://www.java2s.com/Tutorial/C/CatalogC.htm
http://beej.us/guide/bgc/
onlinecomputerbooks.com

X86 Assembly:
Ok now to understand what the computer reads when we compile C and C++. I am going to mostly stick to the IA-32(X86) assembly language. Read the first link to understand why. It explains it very well.
Skullsecurity: Assembly
http://en.wikibooks.org/wiki/X86_Assembly
[book]The Art of Assembly
Assembly primer for hackers

Windows Programming:
This is to help understand what we are programming in and the structure of libraries in the OS. This area is very important far down the line
http://en.wikibooks.org/wiki/Windows_Programming
http://www.relisoft.com/win32/index.htm
[book]Windows Internals 5
[book]Windows Internals 4

Disassembly:
Dissassembly is not as much programming as it is what the computer understands and the way it is interpreted from CPU and memory. This is where we start getting into the good stuff.
http://en.wikibooks.org/wiki/X86_disassembly


Part 2: Getting started

Now that we have a very good understanding of programming languages and what the machine is doing we can start working on task at hand, exploitation.
Here I will start a lot of the learning in very much a list format and adding in comments or Parallel learning areas when needed.

Smash the stack for fun and profit (Phrack 49)
C function call conventions and the stack
[videos] Code Audit from cryptocity.net

(Parallel learning #1 finished: You should now have finished on Parallel learning 1 and have a good understanding of one of the 3 languages)

[Book]Hacking art of exploitation [Chapter 1&2]
Corelan T1
Corelan T2

Parallel learning #2:(complete this section before end of part 2)
(Read the first few posts on this blog has some good info)
Kspice blog
(Read some of the post from this blog they are very helpful with starting out with fuzzers.)
Nullthreat's blog
(I am linked directly to a demo exploit for this area but this is a useful blog to keep track of for many things)
A demo exploit

tenouk.com: Buffer overflow intro
The Tao of Windows Buffer Overflow
nsfsecurity on BOF
Hacker center: BOF
[video] Buffer overflow Primer
[Book]Shellcoder's Handbook Ch1&2
[Book]Hacking art of exploitation [Chapter 3]
Corelan T3A
Corelan T3B
SEH overwrite simplified

((Parallel learning #2 finished:)

Part 3:Tools of the trade

This is a list of tools I have started using and find very useful.
Immunity Debugger
Ollydbg
Windbg
IDA Pro
explorer suite
Sysinternals

And here are some corelan posts on how to use them. I will supply more in future but this is a very good start.
Corelan T5
Corelan: Immunity debugger cheatsheet

Part 4: Network and Metasploit

(Networking)
Beej.us network programming
[Book]Hacking art of exploitation [Chapter 4]

(Metasploit)
[Video]Security Tube: Metasploit Megaprimer
Metasploit.com
Metasploit Unleashed
Metasploit Louisville Class
Metasploitable (a target)
Corelan T4
intern0t: developing my first exploit
DHAtEnclaveForensics: Exploit Creation in Metasploit
Wikibooks Metasploit/Writing Windows Exploit


Part 5: Shellcode

Corelan T9
[Book]Shellcoder's Handbook Ch3
[Book]Hacking art of exploitation [Chapter 5]
Writing small shellcode
Shell-storm Shellcode database


Part 6: Engineering in Reverse

Parallel Learning #3:(constant place to reference and use for reversing)
[forum]reverse-engineering.net
Reverse Engineering the World
Room362.com reversing blog post

Ethicalhacker.net intro to reverse engineering
acm.uiuc.edu Intro to Reverse Engineering software
[Book]Reversing: secrets of reverse engineering
[video]Reverse Engineering from cryptocity.net
CrackZ's Reverse Engineering Page
Reverse engineering techniques

[GAME]Crackmes.de

Part 7: Getting a little deeper into BOF

Parallel Learning #4:(To the end of the course and beyond)
Find old exploits on Exploit-db download them, test them, rewrite them, understand them.

[video]Exploitation from cryptocity.net
Buffer overflow protection
Wikipedia Executable space protextion
Wikipedia DEP
Wikipedia ASLR
Purdue.edu: Canary Bit
Corelan T6
Bypassing Hardware based DEP
Corelan T7
Corelan T8
Corelan T10
Virtual Worlds - Real Exploits

[GAME]Smash the stack wargaming network

Part 8: Heap overflow

rm -rf / on heap overflow
w00w00 on heap overflow
[book][Book]Shellcoder's Handbook Ch4&5
h-online A heap of Risk
[video]Defcon 15 remedial Heap Overflows
heap overflow: ancient art of unlink seduction
Memory corruptions part II -- heap

[book]Read the rest of Shellcoder's Handbook

Part 9: Exploit listing sites

Exploit-DB
Injector
CVE Details
Packetstorm
CERT
Mitre
National Vulnerability Database

(bonus: site that lists types of vulnerabilties and info)
Common Weakness Enumberation

Part 10: To come

1. Fuzzing
2. Might be a while but I plan on doing a whole web exploitation post that will be an add to this but a whole new post



If anyone has any good links to add post a comment and I will try to add them or send me the link and I will review and add it.
From 0x90 to 0x4c454554, a journey into exploitation.
In the last few weeks I have been diving deeper down the rabbit hole of exploitation work and with a bit of work and time to prepare myself for the long run I compiled a set of areas to study in a course type layout. I hope my research will help others spend more time learning and less time searching.
Because I am doing this myself I may have missed 1 or 2 things and along the way I will add in anything I find to help with process. So let us both get started...

First off I want to thank the corelan guys for the help they have provided me so far in the process. They have been there for me through my learning with knowledge and help. Thank you!

layout: I will be posting in a hierarchical structure, each hierarchy structure should be fully understood before moving on to the next section. I will also post sets of Parallel learning topics that you can use to study in line with other topics to help prevent monotony. These Parallel areas will have a start and end mark which shows when they should be complete in perspective to the overall learning
Here is a PDF of the course to help keep track and understand the layout. Course_layout.pdf
"New background soon -> desktop background Cheatsheet added to documents page Backgrounds

Other Posts like this one:
Because of quality of these two posts I wanted to put them at the top. I could not figure out where to put them in the list because they cover so much.
past-present-future of windows exploitation
smashing the stack in 2010(Great resource)


Part 1: Programming

Parallel learning #1:(complete this section before getting to the book "Hacking Art of exploitation")
While going through the programming area I concentrate on core topics to help us later on with exploit writing. One area that is very good to pick up is some kind of scripting language. Listed below are some of the most popular scripting languages and ones I feel will prove to be the most useful.

Python: One of my favorite languages and growing in popularity python is a powerful language that is easy to use and well documented.
Wikibooks Python
http://docs.python.org/
onlinecomputerbooks.com

Ruby: If you plan on later on working inside of metasploit this may be the language you want to start with.
Wikibooks Ruby
LittleBookOfRuby
onlinecomputerbooks.com

Perl: An older language that still has a lot of use perl is one of the highest used scripting languages and you will see it used in many exploits. (I would suggest python over perl)
[book] O'Reilly Learning Perl
onlinecomputerbooks.com


C and C++ programming:
It is very important to understand what you are exploiting so to get started let us figure out what we are exploiting. You do not need to go through all of these but when finished with this section you should have a good understanding of C and C++ programming.
Cprogramming.com
http://www.java2s.com/Tutorial/C/CatalogC.htm
http://beej.us/guide/bgc/
onlinecomputerbooks.com

X86 Assembly:
Ok now to understand what the computer reads when we compile C and C++. I am going to mostly stick to the IA-32(X86) assembly language. Read the first link to understand why. It explains it very well.
Skullsecurity: Assembly
http://en.wikibooks.org/wiki/X86_Assembly
[book]The Art of Assembly
Assembly primer for hackers

Windows Programming:
This is to help understand what we are programming in and the structure of libraries in the OS. This area is very important far down the line
http://en.wikibooks.org/wiki/Windows_Programming
http://www.relisoft.com/win32/index.htm
[book]Windows Internals 5
[book]Windows Internals 4

Disassembly:
Dissassembly is not as much programming as it is what the computer understands and the way it is interpreted from CPU and memory. This is where we start getting into the good stuff.
http://en.wikibooks.org/wiki/X86_disassembly


Part 2: Getting started

Now that we have a very good understanding of programming languages and what the machine is doing we can start working on task at hand, exploitation.
Here I will start a lot of the learning in very much a list format and adding in comments or Parallel learning areas when needed.

Smash the stack for fun and profit (Phrack 49)
C function call conventions and the stack
[videos] Code Audit from cryptocity.net

(Parallel learning #1 finished: You should now have finished on Parallel learning 1 and have a good understanding of one of the 3 languages)

[Book]Hacking art of exploitation [Chapter 1&2]
Corelan T1
Corelan T2

Parallel learning #2:(complete this section before end of part 2)
(Read the first few posts on this blog has some good info)
Kspice blog
(Read some of the post from this blog they are very helpful with starting out with fuzzers.)
Nullthreat's blog
(I am linked directly to a demo exploit for this area but this is a useful blog to keep track of for many things)
A demo exploit

tenouk.com: Buffer overflow intro
The Tao of Windows Buffer Overflow
nsfsecurity on BOF
Hacker center: BOF
[video] Buffer overflow Primer
[Book]Shellcoder's Handbook Ch1&2
[Book]Hacking art of exploitation [Chapter 3]
Corelan T3A
Corelan T3B
SEH overwrite simplified

((Parallel learning #2 finished:)

Part 3:Tools of the trade

This is a list of tools I have started using and find very useful.
Immunity Debugger
Ollydbg
Windbg
IDA Pro
explorer suite
Sysinternals

And here are some corelan posts on how to use them. I will supply more in future but this is a very good start.
Corelan T5
Corelan: Immunity debugger cheatsheet

Part 4: Network and Metasploit

(Networking)
Beej.us network programming
[Book]Hacking art of exploitation [Chapter 4]

(Metasploit)
[Video]Security Tube: Metasploit Megaprimer
Metasploit.com
Metasploit Unleashed
Metasploit Louisville Class
Metasploitable (a target)
Corelan T4
intern0t: developing my first exploit
DHAtEnclaveForensics: Exploit Creation in Metasploit
Wikibooks Metasploit/Writing Windows Exploit


Part 5: Shellcode

Corelan T9
[Book]Shellcoder's Handbook Ch3
[Book]Hacking art of exploitation [Chapter 5]
Writing small shellcode
Shell-storm Shellcode database


Part 6: Engineering in Reverse

Parallel Learning #3:(constant place to reference and use for reversing)
[forum]reverse-engineering.net
Reverse Engineering the World
Room362.com reversing blog post

Ethicalhacker.net intro to reverse engineering
acm.uiuc.edu Intro to Reverse Engineering software
[Book]Reversing: secrets of reverse engineering
[video]Reverse Engineering from cryptocity.net
CrackZ's Reverse Engineering Page
Reverse engineering techniques

[GAME]Crackmes.de

Part 7: Getting a little deeper into BOF

Parallel Learning #4:(To the end of the course and beyond)
Find old exploits on Exploit-db download them, test them, rewrite them, understand them.

[video]Exploitation from cryptocity.net
Buffer overflow protection
Wikipedia Executable space protextion
Wikipedia DEP
Wikipedia ASLR
Purdue.edu: Canary Bit
Corelan T6
Bypassing Hardware based DEP
Corelan T7
Corelan T8
Corelan T10
Virtual Worlds - Real Exploits

[GAME]Smash the stack wargaming network

Part 8: Heap overflow

rm -rf / on heap overflow
w00w00 on heap overflow
[book][Book]Shellcoder's Handbook Ch4&5
h-online A heap of Risk
[video]Defcon 15 remedial Heap Overflows
heap overflow: ancient art of unlink seduction
Memory corruptions part II -- heap

[book]Read the rest of Shellcoder's Handbook

Part 9: Exploit listing sites

Exploit-DB
Injector
CVE Details
Packetstorm
CERT
Mitre
National Vulnerability Database

(bonus: site that lists types of vulnerabilties and info)
Common Weakness Enumberation

Part 10: To come

1. Fuzzing
2. Might be a while but I plan on doing a whole web exploitation post that will be an add to this but a whole new post



If anyone has any good links to add post a comment and I will try to add them or send me the link and I will review and add it.

Read more.

How to Export Your Facebook Friends’ E-mail Addresses

Last night, TechCrunch reported that Google will now require sites that import e-mail addresses from Gmail to also allow export of their data. The move was clearly aimed at Facebook, which has kept Google from accessing their users’ data. In response, many people have mentioned that while Facebook lets users download some data, they’re still not able to download an e-mail address book of their Facebook contacts.

However, that’s not quite the case. Back in March, I published a guide to exporting data from Facebook using various tricks and FQL queries. Facebook has since made changes and added tools which have made the post a bit outdated, but much of the information still applies. In particular, I described using Yahoo’s contact import tool to download an e-mail address book for all your Facebook friends. This technique relies on a Facebook-approved feature and should not violate the site’s terms of service. A few specific steps have changed a bit, so I’ll recap the process here.

First, you need to have a Yahoo! Mail account. If you don’t already have one, you can create one for free. In fact, I’d advise creating a new account to avoid your Facebook friends’ e-mail addresses getting mixed up with any others already in your address book.
To add your friends’ e-mail addresses to your Yahoo! Address Book, follow the steps given on this page at the Yahoo! Mail blog. Essentially, you open Contacts, click on “Tools,” then “Import,” choose “Facebook,” and follow the steps. You will have to authorize a Facebook application built by Yahoo! for this purpose.
To save a local copy of these addresses, you can use the export tools in Yahoo! Address Book. Return to your Contacts, once again click “Tools,” and this time select “Export.” You’ll be presented with a list of programs, each with an “Export Now” button.
If you’re not sure which you should choose, I would recommend clicking the button next to Microsoft Outlook. You may have to enter a code a CAPTCHA code, but you’ll then be prompted to save a file in CSV format. This is a fairly standard way of saving contact information.
Once you’ve downloaded the file, you can use it to import your contacts into other places, including Outlook. You can also open the file in Microsoft Excel to view the contact list or make changes.

Read more

Adobe Suggests Workaround for New Reader Zero-Day

Adobe is still investigating reports of a new code execution vulnerability in Adobe Reader and Acrobat, but recommends blacklisting the affected JavaScript function in the meantime.

The flaw was reported as a zero-day on Wednesday, when someone posted a proof-of-concept exploit on the Full Disclosure mailing list.


However, it appears the issue has been known as a Denial of Service (DoS) condition since almost a year ago, when it was disclosed on a Russian-language blog.

Adobe confirmed the DoS attack vector, but has not yet verified if the bug can be exploited to execute arbitrary code.

Nevertheless, French vulnerability research vendor VUPEN Security has published an advisory suggesting that it is possible.

The vulnerability is caused by a heap corruption error in the "EScript.api" plugin, triggered when a PDF document calls the "printSeps()" undocumented function.

As a temporary workaround Adobe recommends adding this function to the JavaScript API blacklist used by Adobe Reader and Acrobat.

On Windows, this can be achieved via two separate registry entries, one for enterprise policies and one used by Adobe's patching process.

"The Adobe blacklist is modified by Adobe Reader patches whenever an API is deemed vulnerable. APIs are also removed from the blacklist whenever a fix for a vulnerability is provided by the current patch," the company explains.

The blacklisting can be done by creating the key "tBlackList" under "HKLM\SOFTWARE\Adobe\\\JavaScriptPerms" with a value of "Doc.printSeps" (case sensitive).

On 64-bit flavors of Windows the location is "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Adobe\\\JavaScriptPerms".

The location of the enterprise blacklist is "HKLM\SOFTWARE\Policies\Adobe\\\FeatureLockDown\cJavaScriptPerms", however, entries added here are not automatically removed by Adobe's patches.

Therefore, when a fix is released, in order to restore the functionality provided by printSeps(), the key will have to be removed manually.

Instructions to get the same results on Mac and Linux versions of the products are provided on the Adobe Product Security Incident Response Team (PSIRT) blog.


Read More.

Thursday, November 4, 2010

Understanding Firesheep Attack

The recently released Firesheep tool caused quite a buzz. Packaged as an easy to install Firefox add-on, the tool allowed an attacker to quickly identify nearby users that were insecurely accessing popular websites. The tool's easy to use design allowed a user with basic computer skills to see pictures of the vulnerable users in a buddy list style text box and enabled the user/attacker to simply double click on the user's picture in order to completely take over their account.


Brief aside: While I do work at Mozilla, this post is primarily focused on explaining the underlying website security controls that have failed to enable such an attack. To learn more about Mozilla's view of the Firesheep plugin I encourage you to read the post at the Mozilla Security Blog.

Why Is This News?
Firesheep does not exploit a new vulnerability. The vulnerable design of sending authenticated cookies over an unencrypted channel has been known for years. The reason Firesheep is making news is because of the ease of use to execute an attack and exploit this weakness in popular websites such as Facebook and Twitter. Perhaps all of this press, and a few angry users that are victim to unwanted status updates or tweets, may result in these large social networking sites actually fixing the issue.

How Does Firesheep Work?
First, Firesheep does not steal the victim's password that they are using with a website (twitter/facebook/etc). In fact, the passwords are correctly and securely sent to those websites. Instead Firesheep steals the session identifier for the user. The session id is a long random number that is used to represent the user after the user has authenticated to the website with their username and password. Without session ids a user would need to send their username and password with every request. The session id was created to eliminate this inconvenience and allow a user to simply provide their password once and allow the browser and website to handle the rest. The browser remembers the user's session id and the web server makes a record within their databases to associate the session id and user's identity. From this point on the web site knows that each time they receive the particular session id that the request is coming from the associated user.

Examples of session ids that would be stored on the web server
Session ID - Associated User
4364256265 - Joe
1239086434 - Sue
9938381123 - Bob
Where is the Security Problem?
Many users are aware that before logging into a website they should check that they are on a page beginning with HTTPS (instead of HTTP). HTTPS uses Transport Layer Security (TLS) (sometimes referred to as SSL) to ensure that the password is sent over an encrypted connection. This means that a network administrator, the coffee shop folks running a wireless hotspot, or even the coffee drinker sitting next to you, is unable to view your password when it is sent over the network.

The problem is in the next step. As we discussed above, the username and password is only sent once. After that, the web browser sends the session id to the website in order to identify the user. Unfortunately many websites have decided not to implement TLS/SSL for the communication after the login process. This means that although your password is sent over an encrypted channel, the session id is not. Since the session id represents the user's identity with the website, anyone that obtains the session id thereby becomes the associated user.

How Does The Attacker Obtain Your Session ID?
The attacker, in this case the user running Firesheep, executes a man in the middle attack which tells your computer to send all of your traffic to the attacker's machine before it is sent out to the Internet. This allows the attacker to easily view any data that is not encrypted like the session id. Encrypted data, such as the username and password, can not be viewed by the attacker even if he is executing a man in the middle attack.



To summarize, although the attacker can't obtain your password, they can obtain your session id. And this is just as good. Because with the session id the attacker can do anything in the website as you. In Facebook they could add new friends or make status updates and on Twitter they could tweet random messages. All of this would appear to normal just as if you had made these actions yourself.

Stay tuned for post #2 in the Firesheep series : Spotting Websites Vulnerable to Firesheep

-Michael Coates

Tuesday, November 2, 2010

ProFTPD TELNET_IAC Remote Code Execution Vulnerability

-- CVSS ----------------------------------------------------------------
10, (AV:N/AC:L/Au:N/C:C/I:C/A:C)

-- ABSTRACT ------------------------------------------------------------

TippingPoint has identified a vulnerability affecting the following
products:

ProFTPD FTP Server

-- VULNERABILITY DETAILS -----------------------------------------------

This vulnerability allows remote attackers to execute arbitrary code on
vulnerable installations of ProFTPD. Authentication is not required to
exploit this vulnerability.

The flaw exists within the proftpd server component which listens by
default on TCP port 21. When reading user input if a TELNET_IAC escape
sequence is encountered the process miscalculates a buffer length
counter value allowing a user controlled copy of data to a stack buffer.
A remote attacker can exploit this vulnerability to execute arbitrary
code under the context of the proftpd process.

Tested on proftpd-1.3.3a.
[Switching to process 31268]
0x0806d498 in pr_netio_telnet_gets (buf=0xbf979ffc 'A' times>..., buflen=4294963202, in_nstrm=0x97d77e4, out_nstrm=0x97d79f4)
at netio.c:1103
1103 *bp++ = cp;

FTP commands are read by function pr_cmd_read() of file
src/main.c (line 566).

The function pr_cmd_read() uses a local buffer (line 568):
char buf[PR_DEFAULT_CMD_BUFSZ+1] = {'\0'};

At line 582, pr_cmd_read() calls pr_netio_telnet_gets():
if (pr_netio_telnet_gets(buf, sizeof(buf)-1, [...]

The second parameter of pr_netio_telnet_gets() is "sizeof(buf)-1",
so its value is :
sizeof(buf)-1 =
(PR_DEFAULT_CMD_BUFSZ+1)-1 =
PR_DEFAULT_CMD_BUFSZ = [defined in src/main.c]
PR_TUNABLE_PATH_MAX + 7 = [defined in include/options.h]
MAXPATHLEN + 7 = [on Linux, MAXPATHLEN==4096]
4096 + 7 =
4103

The function pr_netio_telnet_gets() is defined in src/netio.c
(line 991):
pr_netio_telnet_gets(char *buf, size_t buflen, [...]

We have buflen==4103. It is first decremented, and then
each read character decrements it. This is inside a loop
which stops when buflen==0, or when a '\n' character
is found (line 1039).

However, on line 1073, there is:
buflen--;
So, buflen can be decremented by TWO inside the loop. This
case occurs because the function processes TELNET_IAC
escape characters followed by a TELNET_xyz character.

So, successive buflen values can be :
4103
4102
...
3
2
1 (here we manage to decrement by TWO, by putting
a TELNET_IAC character at this location)
-1
-2
...
So, the loop never stops because buflen is never zero.
The loop will only stop when a '\n' character is found
(line 1039).

So, every character between the TELNET_IAC and the
'\n' will overflow the stack buffer. This is a classical
stack overflow.


-- CREDIT --------------------------------------------------------------

This vulnerability was discovered by:

* Anonymous



Playing with MS10-061

General Information
Executive Summary

This security update resolves a publicly disclosed vulnerability in the Print Spooler service. The vulnerability could allow remote code execution if an attacker sends a specially crafted print request to a vulnerable system that has a print spooler interface exposed over RPC. By default, printers are not shared on any currently supported Windows operating system.

This security update is rated Critical for all supported editions of Windows XP, and Important for all supported editions of Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2. For more information, see the subsection, Affected and Non-Affected Software, in this section.

The security update addresses the vulnerability by correcting the manner in which the Printer Spooler service validates user permissions. For more information about the vulnerability, see the Frequently Asked Questions (FAQ) subsection for the specific vulnerability entry under the next section, Vulnerability Information.

Recommendation. The majority of customers have automatic updating enabled and will not need to take any action because this security update will be downloaded and installed automatically. Customers who have not enabled automatic updating need to check for updates and install this update manually. For information about specific configuration options in automatic updating, see Microsoft Knowledge Base Article 294871.

For administrators and enterprise installations, or end users who want to install this security update manually, Microsoft recommends that customers apply the update immediately using update management software, or by checking for updates using the Microsoft Update service.

See also the section, Detection and Deployment Tools and Guidance, later in this bulletin.

Read More
Let's write some thing to %SystemRoot%\\system32 ;))

Playing with MS10-061 Vietnamese from Sangteamtham on Vimeo.


Download the demo video and play with me :)


Link