ASP Implementation of Serv-U Local Privilege Escalation

Source: Internet
Author: User

The mswinsock control can be used for online circulation. This is a third-party component. The chances are quite small. If you want to kill people, you must adopt a set of methods to kill them.
The Serv-U server uses the FTP protocol for management, so we should study the FTP protocol first.

Normal FTP authentication process:

220 Serv-u ftp server v5.2 for Winsock ready...

User lake2

331 user name Okay, need password.

Pass lake2lake2

230 user logged in, proceed.

......

Now I am confused:

220 Serv-u ftp server v5.2 for Winsock ready...

Hi, I'm Bill Gates!

530 not logged in.

Open!

530 not logged in.

I am hacker!

530 not logged in.

Give you money

530 not logged in.

User lake2

331 user name Okay, need password.

Pass lake2lake2

230 user logged in, proceed.

......

Note: If the expected data is not user XXX, Serv-U returns an error message and waits until the correct logon command. What does it imply? Oh, it implies that we are going to succeed.

Recently, there have been many XMLHTTP components. The built-in component of this system is to send and receive data using HTTP. We will use this component to implement Serv-U elevation. Now the question is, how can we send the FTP protocol over HTTP?

Hey, I didn't see the results of my hard-working tests just now. As long as I use post to submit data, the post content is an FTP command, because the preceding HTTP packet header is ignored by commands that Serv-U considers as illegal, and the post content, namely, the FTP command, is executed!

Due to the characteristics of XMLHTTP and Serv-U, there are also a series of problems: XMLHTTP does not have timeout settings, because the HTTP packet header cannot be returned by the server, it will be suspended; XMLHTTP is a single user and socket is reused. According to the HTTP protocol version, there are only two or four connections to the same target, so it is executed once (or twice) after a domain is added and deleted, it cannot be connected again. The pseudo FTP protocol used in Serv-U management mode, that is, the quit command is not recognized, the connection cannot be disconnected (serverxmlhttp can solve these problems well, but it is limited to XP, and it cannot be disconnected on 2000/2003, depressing ).

Therefore, we only need to use one of the following methods to solve the above problems:

1. XMLHTTP first adds an FTP user;

2. log on to FTP and use the new account to execute n multiple commands to escalate permissions;

3. XMLHTTP deletes a new user

You must remember that because the connection cannot be disconnected, you only have one or two chances to perform the above steps! If you want to restart IIS or FTP, wait.

Fortunately, I used to write a command execution using an FTP account with the execution permission.Program, Makes the 2nd step convenient a lot, the program download here: http://xiazai.jb51.net/tools/hacktools/ftpshell.rar

Complete ASPCodeDownload here: http://xiazai.jb51.net/tools/hacktools/suASP.rar

This ASP program will add an execution permission user with the user name Lake password admin123 on port 21. In special cases (for example, the ftp port is not 21), change the code by yourself.

It seems that ASP can also be used to access FTP to do something in a specific situation, but that's your problem.

Enjoy it!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.