Author Topic: An Introduction Into Web Exploitation  (Read 4049 times)

0 Members and 1 Guest are viewing this topic.

Offline iTpHo3NiX

  • EZ's Pirate Captain
  • Administrator
  • Titan
  • *
  • Posts: 2920
  • Cookies: 328
    • View Profile
    • EvilZone
An Introduction Into Web Exploitation
« on: March 03, 2014, 05:13:20 am »
Introduction

The following is a copy/paste from BHL (source included at the bottom). I figured I would post this as it's a great starting point to get people started with web exploitation. There are tutorials on here that talk about these subjects but in my search on here I didn't really find a starting point on web exploitation in general. This way a newcomer looking into web exploitation can start here and then continue on to more in depth knowledge after they know what to look for.

Web Exploitation

Web exploitation is the attacking and taking advantage of a vulnerability in a computer system through a web application. There are numerous ways to exploit vulnerabilities so only some of the basics will be covered here. The topics and tools covered in this series can be dangerous enough to compromise an HTTP server's database, source code, or allow a remote operating system level shell. Additionally, many web application vulnerabilities leverage the victim's browser (such as Javascript execution) to chain vulnerabilities together.

When testing a domain for security problems, it is different than penetration testing a network, and different than assessing the vulnerability of a server. However, compromising one of these layers may result in the other proximal layers being compromised in the future. Web application vulnerabilities are currently the amongst the most prominent vulnerabilities exploited by cybercriminals.

Affected Languages

Many web sites run web applications for the purpose of dynamic content. Usually this would include an SQL database backend of some sort, and a web application (like forums, talkboards, content management systems, and blogs) to interface with the SQL database. Therefore the affected programming languages are anything that can be used as an interface over HTTP to dynamic content, but are usually one of many interpreted languages.

  • PHP
  • Perl
  • Ruby
  • Python
  • CFM
  • ASP
  • Any CGI interfaced language may also be vulnerable to web exploitation.

Types of Exploitation

  • Cross Site Scripting

XSS can be used to capture logins and sessions or a page redirect if a user clicks a malicious link. *m0rph note* XSS can also be used to inject iframes that redirect to a client-side exploit, resulting in client code execution. This attack vector is common in drive-by attacks, and malware delivery. *end of m0rph note*

  • SQL Injection

SQL injection can be used to copy, modify, or delete the affected application's database, *m0rph note* create web files, and enumerate potential system accounts. If the particular database you attack is running under a DBA account, you can leverage command execution by uploading shared objects into the SQL library directory. *end of m0rph note* Blind SQL injection can be used to retrieve data without the data ever appearing in band.

  • File Inclusion

File inclusion vulnerabilities can be exploited to create a remote shell, which can lead to database manipulation and file tampering.

  • Command Injection

Command injection effectively hands a remote shell to an attacker by arbitrary bash, MS-DOS, or native command-line execution.

  • Cross Site Request Forgery

CSRF allows an attacker to perform actions as any unsuspecting user that clicks a link or loads a page on a separate domain from the affected site; a user's vulnerability is limited to the time spent while logged into the affected site.

  • Cross Site Content Forgery

XSCF Sends different data to different hosts. This way, if a piece of malware is able to recognize the source machine as something analyzing it, the malware can return something innocent, while unsuspecting users are directed to something of the attacker's choosing. This could range from a prank to a web browser drive-by exploit, similar to XSS

  • XSRF(XSS mixed with CSRF)

XSRF is using XSS to produce a same-domain URL that will perform actions as the logged in user via a CSRF attack.

  • Mass Assignment Abuse

Mass assignment abuse can allow an attacker to directly overwrite database values without having to write any SQL queries and without the use of SQL injection.

HTTP Methods

*m0rph note*
HTTP PUT method allows for a http client to directly put arbitrary files onto an http server. This method is not commonly enabled due to its obvious drawbacks.

HTTP TRACE method allows an http client to see information being received on the server. This has the potential to reveal another user's cookie to the attack client with the help of XSS. Most browsers now prohibit trace methods from being called from javascript; however, this can still be pulled off from other languages such as java and perl.
*end of m0rph note*

HTTP GET request parameters (Variables in the URL)
Rewritten or "clean" URL's can have GET parameters too! HTTP HEAD requests can also exploit poor input sanitizing in these parameters.

HTTP POST request parameters (Fields and fieldsets in web forms)
You can send post parameters to a URL that has GET parameters!

HTTP Header parameters (Variables passed by header information)
This includes cookies, user agents, connection type, and more

Fingerprinting

Because web vulnerability identification sometimes requires that you identify the backbone of a particular web configuration, fingerprinting is commonly used as a medium to gain information about commonly used platforms in an attempt to identify them through common fingerprints.

These might include things such as common headers, footers, comments in code- or simply the existence of a very particular page. Fingerprinting is a key aspect in determining vulnerabilities in specific software packages, and might also be used in conjunction with a search engine in order to get large lists of vulnerable hosts through searching for a single commonality.
In the instance that a site being tested is using open source software available in a git repository, it is possible to use halcyon to create signature data from the repository metadata. Providing these signatures to kolkata and initiating a scan can determine the version of the software running on the site.

Source (includes links to vulnerability scanners as well as some more in depth information on the topics discussed here):
http://www.blackhatlibrary.net/Web_exploitation
« Last Edit: March 20, 2014, 10:32:50 am by m0rph »
[09:27] (+lenoch) iTpHo3NiX can even manipulate me to suck dick
[09:27] (+lenoch) oh no that's voluntary
[09:27] (+lenoch) sorry

Z3R0

  • Guest
Re: An Introduction Into Web Exploitation
« Reply #1 on: March 03, 2014, 09:39:18 am »
Ugh...no discredit to you DeepCopy, but this tut is largely incomplete. Updates to this tutorial to come soon.

Offline iTpHo3NiX

  • EZ's Pirate Captain
  • Administrator
  • Titan
  • *
  • Posts: 2920
  • Cookies: 328
    • View Profile
    • EvilZone
Re: An Introduction Into Web Exploitation
« Reply #2 on: March 03, 2014, 07:22:10 pm »
Ugh...no discredit to you DeepCopy, but this tut is largely incomplete. Updates to this tutorial to come soon.

Feel free to edit and add. I was wanted to find a starting point for people getting into web exploitation. As I've said this isn't my area, just wanted to share for basic knowledge. That goes for anyone that can just edit, if you can't post it here and I will update it. We can also use this as a base and expand on the info to make it better
« Last Edit: March 03, 2014, 07:22:21 pm by DeepCopy »
[09:27] (+lenoch) iTpHo3NiX can even manipulate me to suck dick
[09:27] (+lenoch) oh no that's voluntary
[09:27] (+lenoch) sorry

Offline I_Learning_I

  • Knight
  • **
  • Posts: 267
  • Cookies: 26
  • Nor black or white, not even grey. What hat am I?
    • View Profile
    • Hacking F0r Fr33
Re: An Introduction Into Web Exploitation
« Reply #3 on: March 03, 2014, 09:14:28 pm »
Even though I appreciate the share I would rather have a (simple and small) list of topics on the website and have the link towards it, rather than a huge copy/paste.
Unless this is to become an archive/copy.

Much of this information is on OWASP and many other hacking websites, none of this is even hard to find.


The hardest part for anyone starting in this area is to:
a)Find out what this area is called (Web exploitation is hard to get to, when most people search for hack site)
b)Knowing the language they're exploiting.
« Last Edit: March 03, 2014, 09:14:57 pm by I_Learning_I »
Thanks for reading,
I_Learning_I

Offline iTpHo3NiX

  • EZ's Pirate Captain
  • Administrator
  • Titan
  • *
  • Posts: 2920
  • Cookies: 328
    • View Profile
    • EvilZone
Re: An Introduction Into Web Exploitation
« Reply #4 on: March 03, 2014, 09:52:11 pm »
Even though I appreciate the share I would rather have a (simple and small) list of topics on the website and have the link towards it, rather than a huge copy/paste.
Unless this is to become an archive/copy.

Much of this information is on OWASP and many other hacking websites, none of this is even hard to find.


The hardest part for anyone starting in this area is to:
a)Find out what this area is called (Web exploitation is hard to get to, when most people search for hack site)
b)Knowing the language they're exploiting.

This is meant to hopefully make it as a sticky once more information is included so when people post an intro and want to learn web exploitation we can point them here. Then we can also use this to link to other tutorials on this site that will over time get buried as more tutorials are added, so it will go more in depth on each subject listed as well as the languages. At that point it will no longer be a copy paste from some random hacking site. As a sticky with a lot of introductory information so people can learn more. When im at work I will try and search around and update it with more information. Whether this information is on other sites, so is just about everything posted on here. I know I want all the information to be on EvilZone as this site has been around and not going anywhere any time in the near future and I can't speak for other sites longevity like I can with EvilZone. Been on this site for 8+ years, and knowing since ande took over the site, he has backups and the information wrong be lost like the net/org split.
[09:27] (+lenoch) iTpHo3NiX can even manipulate me to suck dick
[09:27] (+lenoch) oh no that's voluntary
[09:27] (+lenoch) sorry

Offline I_Learning_I

  • Knight
  • **
  • Posts: 267
  • Cookies: 26
  • Nor black or white, not even grey. What hat am I?
    • View Profile
    • Hacking F0r Fr33
Re: An Introduction Into Web Exploitation
« Reply #5 on: March 03, 2014, 11:14:03 pm »
I'm not opposing having the same information per se, even if I find it redundant and other places might have been up longer and will be for a longer time as they belong to company's that actually make money based on this kind of information.
Even so, if you want to make a TuT about this why not use your own words and ideas? If you start something the wrong way, how do you expect to finish it the right way?
I truly consider starting with a copy paste a bad start as when you try to add something you will have to do it according to what has been written already, you have to revise everything, etc... and in the end who will claim credit for it? multiple unknown people. Just my opinnion.


Also there's already LFI/RFI/SQLi/XSS guides in this forum-
« Last Edit: March 03, 2014, 11:14:22 pm by I_Learning_I »
Thanks for reading,
I_Learning_I

Offline iTpHo3NiX

  • EZ's Pirate Captain
  • Administrator
  • Titan
  • *
  • Posts: 2920
  • Cookies: 328
    • View Profile
    • EvilZone
Re: An Introduction Into Web Exploitation
« Reply #6 on: March 03, 2014, 11:28:21 pm »
I'm not opposing having the same information per se, even if I find it redundant and other places might have been up longer and will be for a longer time as they belong to company's that actually make money based on this kind of information.
Even so, if you want to make a TuT about this why not use your own words and ideas? If you start something the wrong way, how do you expect to finish it the right way?
I truly consider starting with a copy paste a bad start as when you try to add something you will have to do it according to what has been written already, you have to revise everything, etc... and in the end who will claim credit for it? multiple unknown people. Just my opinnion.


Also there's already LFI/RFI/SQLi/XSS guides in this forum-

Like I said, a. This isn't my area, b. It's a starting point not an all inclusive, hence why it says introduction in the title c. When it's complete it will be rewritten, but sourced with everywhere I pull the information from. Also as I stated in my op I did mention that there are more in depth guides on here which will be linked in order to expand on what it is and how to accomplish it
« Last Edit: March 03, 2014, 11:38:41 pm by DeepCopy »
[09:27] (+lenoch) iTpHo3NiX can even manipulate me to suck dick
[09:27] (+lenoch) oh no that's voluntary
[09:27] (+lenoch) sorry

Offline sneelika2013

  • NULL
  • Posts: 3
  • Cookies: -3
    • View Profile
Re: An Introduction Into Web Exploitation
« Reply #7 on: March 06, 2014, 11:48:36 am »
I really enjoy these tutorials. I need more . :)

Z3R0

  • Guest
Re: An Introduction Into Web Exploitation
« Reply #8 on: March 20, 2014, 10:33:16 am »
m0rph notes added

Offline Teapot

  • Peasant
  • *
  • Posts: 127
  • Cookies: -2
  • E-Book Whore
    • View Profile
Re: An Introduction Into Web Exploitation
« Reply #9 on: May 05, 2014, 08:22:39 am »
Thanks DeepCopy!

I like the extra information on what it dose and applicable use.
Allows me to prioritize what i want to learn from this post alone instead
of having to google them all myself and then prioritize.

Suggestion:  Path Traversal Attacks
(Going to Release an in-depth Tut on it eventually for you to link in)

« Last Edit: May 05, 2014, 08:24:55 am by Teapot »