19.08.2015 Views

4.0

1IZ1TDd

1IZ1TDd

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

156Web Application Penetration TestingTest: 408 Request Time-outtelnet 80GET / HTTP/1.1- Wait X seconds – (Depending on the target server, 21seconds for Apache by default)Result:HTTP/1.1 408 Request Time-outDate: Fri, 07 Dec 2013 00:58:33 GMTServer: Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 withSuhosin-PatchVary: Accept-EncodingContent-Length: 298Connection: closeContent-Type: text/html; charset=iso-8859-1...408 Request Time-out...Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9with Suhosin-Patch at Port 80...Test: 501 Method Not Implementedtelnet 80RENAME /index.html HTTP/1.1Host: Result:HTTP/1.1 501 Method Not ImplementedDate: Fri, 08 Dec 2013 09:59:32 GMTServer: Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 withSuhosin-PatchAllow: GET, HEAD, POST, OPTIONSVary: Accept-EncodingContent-Length: 299Connection: closeContent-Type: text/html; charset=iso-8859-1...501 Method Not Implemented...Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9with Suhosin-Patch at Port 80...Test:Enumeration of directories by using access denied error messages:http://Result:Directory Listing DeniedThis Virtual Directory does not allow contents to be listed.Tools• ErrorMint - http://sourceforge.net/projects/errormint/• ZAP Proxy - https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_ProjectReferences• [RFC2616] Hypertext Transfer Protocol -- HTTP/1.1• [ErrorDocument] Apache ErrorDocument Directive• [AllowOverride] Apache AllowOverride Directive• [ServerTokens] Apache ServerTokens Directive• [ServerSignature] Apache ServerSignature DirectiveRemediationError Handling in IIS and ASP .netASP .net is a common framework from Microsoft used for developingweb applications. IIS is one of the commonly used webservers. Errors occur in all applications, developers try to trapmost errors but it is almost impossible to cover each and everyexception (it is however possible to configure the web server tosuppress detailed error messages from being returned to theuser).IIS uses a set of custom error pages generally found in c:\winnt\help\iishelp\common to display errors like ‘404 page not found’to the user. These default pages can be changed and custom errorscan be configured for IIS server. When IIS receives a requestfor an aspx page, the request is passed on to the dot net framework.There are various ways by which errors can be handled in dot netframework. Errors are handled at three places in ASP .net:• Inside Web.config customErrors section• Inside global.asax Application_Error Sub• At the the aspx or associated codebehind page in the Page_ErrorsubHandling errors using web.configmode=”On” will turn on custom errors. mode=RemoteOnly willshow custom errors to the remote web application users. A useraccessing the server locally will be presented with the completestack trace and custom errors will not be shown to him.All the errors, except those explicitly specified, will cause a redirectionto the resource specified by defaultRedirect, i.e., myerrorpagedefault.aspx.A status code 404 will be handled by myerrorpagefor404.aspx.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!