Having a cheat sheet is a perfect starting initiative to assist you with generating ideas during penetration testing. A test case cheat sheet list is often asked for security penetration testing but the problem with this approach is that security testers then tend to use only predefined test cases to determine the security of a specific implementation. But in reality there is no such predefined list that includes all the test cases needed to ensure your application is secure. Such test cases are only sufficient to kick-start the penetration testing process. This paper is designed to offer some common security penetration testing cases in order to grab a specific vulnerability in the existing mechanism.
An attacker usually observes and obtains an abundance of information that the programmer left inadvertently or the application discloses. This kind of attack is not given as much attention as others because programmers don't understand the mindset of the attacker, how exactly they will break the system.
An information disclosure attack is considered to be a very deadly attack because the attacker can either use the information to exploit the vulnerability directly or could use it against your application to exploit another loophole. It poses the following threats:
Information Disclosure

- Disclose application files
- Inspect contents and path of a file
- Disclose information about a process and its allies
- Information retrieval through monitoring
- Inspect Metadata of an Assembly

COM and ActiveX Attacks
ActiveX controls are activated on the computer when the user browses a website and installed specific applications on the client machine such as Media player. They are considered to be a way to extend the functionality in the browser to accomplish actions that the browser can't accomplish through HTML alone. Hence, it is recommended to test COM components and ActiveX controls so that other websites can't utilize these controls in a malicious manner.

- Bypass Browser Security Setting
- Server Redirection
- Namespace and Behavior
- Exception Handlers
- Return Values

Managed Code Vulnerability
It is mandatory to include a managed code assembly into testing because they are always susceptible and could have some serious vulnerabilities in the form of SQL Injection, Buffer overflow and XSS. Despite being the latest version of the .NET Framework, many applications today are written using unmanaged code that run directly on the system that presents a huge threat because now the system has limited security protection from what happens when the application executes.

- Look at unsafe blocks for buffer overflow attacks
- Look for PermitOnly and Deny to Sandbox code
- Examine broad Asserts
- Look for a partially trusted caller
- Examine Poor Exception handling

HTML Script Injection Attacks
HTML is not only rendering codes on web pages but also assist hackers in exploiting that code. Attackers plant malicious script in a way that a programmer normally couldn't. HTML scripting attacks are done using cross-site scripting (client-side) or persisted XSS (script injection).

- Object Model Access
- Cookies Access
- Zone Elevation
- User Data Access
Spoofing Attack

- Caller ID Spoofing
- URL Redirection
- Mail Spoofing
- Reformatting using control characters
- IP Address spoofing
Format String Attack

XML Injection Attack
XML is a universal data format that is understood and shared by nearly all platforms. Applications can use an XML file to send data across the wire to an XML parser. The application then accesses the parsed version of the data. In case of not being parsed properly, the application won't be able to access the input. Hence, the input is parsed first before it is sent but that input might find security issues in the application consuming the XML.

- Directory traversal
- Buffer overflow
- Format String
- HTML scripting
- GUI spoofing
DOS Attack

Canonicalization Attacks
An attacker can supply data in the form of 2 different encoding schemes, characters and/or delimiters in an attempt to cause the data to be interpreted incorrectly and drive the application to make certain decisions based on those values in the Canonicalization Attack.

Buffer-Overflow Attack
Buffer Overflow is caused when an input is larger than the space allocated for it that is outside the allocated location and not handled by the program memory that eventually leads to a program crash. Buffer Overflow typically results in enabling hackers to run whatever code they want to take control of the target computer.

- Integer Overflow
- Stack Overflow
- Format String Attack
- Heap Overrun

Code Disassembling
Hackers and Penetration Testers typically manipulate .NET managed assemblies through disassembling in which the entire source code behind a DLL or EXE is retrieved in its original state. Malicious hackers can easily retain or reverse engineer the security restriction by examining the original source code. Code disassembling could be very beneficial in terms of identifying inherent bugs in applications.

Weak Permissions

- Directories, Registry and Files
- Network Share
- Process, Windows Services and Threads
- Active Directory components
- COM objects

SQL Injection Attack
A SQL injection attack permits a malicious hacker to execute commands in your website that is connected to a database. The attacker intent is to provide specially crafted data to the application that uses a database to alter the behavior of SQL commands the application intends to run. However, the attacker might be able to perform such covert operations over a website that has given high privileges or adequate safeguards to source code, to manipulate the database.

- Executing Commands on a machine running a database
- Tampering with data
- Run SQL commands with elevated rights
- Disclose Sensitive Information


kiquenet kiquenetPosted Oct 10, 2017, 7:39 AM
Any full source code helpers about ASP.NET security that you comment? Any web.config sample, C# httpModule, C# Helper for encryption, decode, etc, javascript (JSON) utils about it ?
Max AlbishPosted Oct 26, 2014, 6:41 AM
Thanks a lot