There are many ways to search a system, what we have to be careful of is making sure that the search does not cause a DoS (Denial of Service) attack.
So following on from my article Denial Of Service (DoS) attacks via SQL Wildcards should be prevented here is a method to remove and clean up the search to prevent such an attack.
Following on from my article about checking for the file signature to ensure that the file is who it says it is
I decide to take it further and produce a Data Validation attribute, I found that the Microsoft.Web.Mvc.dll library already has one ,but it only checks for the file names, which is generally okay.
Is it possible to upload files of any type to the server through web application’s functionality?
Only file extension restrictions were could be enforced and the server may not perform any content checking (apart from possible anti-virus checks).
A vulnerability exists in SSL 3.0 and TLS 1.0 that could allow information disclosure if an attacker intercepts encrypted traffic served from an affected system. The weakness is down to insufficiently randomised data being used for the Initialisation Vectors (IV) within the CBC-mode encryption algorithms. The exploit can be performed through multiple injection points, both native to the browser’s functionality.
The software generates an error message that includes sensitive information about its environment, users, or associated data. Extended Description The sensitive information may be valuable information on its own (such as a password), or it may be useful for launching other, more deadly attacks. If an attack fails, an attacker may use error information provided by the server to launch another more focused attack. For example, an attempt to exploit a path traversal weakness might yield the full pathname of the installed application. In turn, this could be used to select the proper number of “..” sequences to navigate to the targeted file. An attack using SQL injection might not initially succeed, but an error message could reveal the malformed query, which would expose query logic and possibly even passwords or other sensitive information used within the query.
Certificate is singed by an unrecognised certificate authority. If a browser receives a self-signed certificate, it pops up a warning, and the burden falls to the user to confirm the identity. Pushing this decision to the user is ultimately what opens up the possibility of a man-in-the-middle (MITM) attack. The security issue is not with self-signed certificates, but with the way users interact with them in the browser.
SQL Wildcard attacks force the underlying database to carry out CPU-intensive queries by using several wildcards. This vulnerability generally exists in search functionalities of web applications. Successful exploitation of this attack will cause Denial of Service (DoS).
Vulnerability overview/description Due to unsanitized user input it is possible to inject arbitrary HTTP header values in certain HTTP responses of the Satellite Server. This can be exploited, for example, to perform session fixation and malicious redirection attacks via the Set-Cookie and the Refresh headers. Moreover, the Satellite Server caches these HTTP responses with the injected HTTP header resulting in all further requests to the same resource being served with the poisoned HTTP response, while these objects remain in cache.
Is it possible to enumerate user account details within the Web application via the logon page?
Where an application requires account details to retrieve other information, it may be possible to enumerate the details based on the error message returned by the application.
I would like to secure up an MVC application, and one way of insuring a secure application is to run through pentesting, Penetration Testing, but what is pentesting?
Wikipedia
A penetration test, occasionally pentest, is a method of evaluating computer and network security by simulating an attack on a computer system or network from external and internal threats. The process involves an active analysis of the system for any potential vulnerabilities that could result from poor or improper system configuration, both known and unknown hardware or software flaws, or operational weaknesses in process or technical countermeasures. This analysis is carried out from the position of a potential attacker and can involve active exploitation of security vulnerabilities.
Enterprise Library Logging Application Block
The Enterprise Library Logging Application Block simplifies the implementation of common logging functions. You can use the Logging Application Block to write information to a variety of locations:
I need to stop caching across all browsers of my website for security reasons. This has been driving me nuts over the past two weeks, as every method I try just keep allow some caching to be stored. Easiest way to check is by pressing the back key on the browsers window as the results should update.
Background Note: Click the process for a larger version.
When a bug is first created it is assigned a nominal story point value of 1. This value is intended to cover the investigation phase of the bug only (or a fix if it’s found to be a small issue). Having a story point value against the bug (even if it only covers investigation initially) means that we can allocate each bug into a sprint along with other backlog items and gives a window of time to investigate the problem. The outcome of this stage should be either: Bug resolved; should only occur with small bugs where the issue was found, fixed and re-tested within the allocated tasked hours Further investigation required; in which case the story-point value of the bug should be increased to indicate that the problem is very complex and was not able to even be progressed during the first pass through the stage Investigation completed; where the problem has been documented within the bug item and a number of tasks (with associated hours assigned) have been created which detail how to resolve the problem Bugs which have not progressed (e.g. outcome 2 in the list above) should be re-story-pointed and added back into the main backlog to progress through stage 1 again at a later date. Obviously bugs which have been resolved (outcome 1) can be marked as such and bugs which have been investigated and tasked (outcome 3) can be added back into the product backlog for assigning to a future sprint. Note: The important point to note about this phase is that it should be considered time-boxed based on what time is allocated to the tasks created for the bug at sprint planning – based on the default story point value and current velocity, this should be roughly around 3 hours total. Stage 2 – Fixing Note: Click the process for a larger version. Bugs which enter this stage should have already been through the first stage of investigation at least once and should have appropriate tasks against them which detail what needs to happen to resolve the problem. Since each bug should have been through the first stage of analysis, we should know enough at this stage to be confident in being able to both apply a fix and complete the associated tasks in the allocated sprint.
Rules to organise the process of Checking in and out of TFS is vital for preserving the integrity of our solution. This list is by no means fool-proof and exhaustive and hence any suggestions are welcomed and encouraged. Before Checking In or Out: Consider getting latest. Check if someone else has already checked the file out. If so, inform that person. This to avoid duplicating activities. Checking out: You can check out a file either explicitly by right clicking and select Check-out or implicitly by typing into the file. Before Checking-Out, check that the file is already checked out by another person; if so, inform that user, this to avoid duplicating activities. Checking In: Before checking in make sure: The modified code compiles. The entire solution builds successfully. StyleCop rules implemented. Code reviewer is present. Add clear and concise description to what has been changed and why. Assign to Work Item(s) ID Code reviewer name entered. Never Auto-Merge; always merge manually. Check that all new files, or relevant assembly in the global Library folder, have been successfully added to TFS. Missing such files might trigger Build Server failure. After checking in keep an eye on the Build Server notification for successful build. At the end of the working day; if the coding is not successfully completed, you must “Shelf” the files within TFS. Make sure to regularly update relevant work items with progress and relevant comment.
The singleton pattern is used in almost all modern day programming languages, so why do I keep finding it written incorrectly in so many applications, so lets start with the right way
public sealed class SimpleNoLockLazy { static readonly SimpleNoLockLazy instance = new SimpleNoLockLazy(); // Explicit static constructor to tell C# compiler // not to mark type as beforefieldinit static SimpleNoLockLazy() { } SimpleNoLockLazy() { } public static SimpleNoLockLazy Instance { get { return instance; } } }</pre> So why this implementation? The reason for using a Singleton is for performance in a multi-threaded environment and this pattern is not only simple, but it is the fastest. I have attached a benchmark application, which is based on Jon Skeet’s benchmark, but testing using a Parallel processes.
First off, why would you want to perform validation in the WCF layer?
After a vigorous PEN test, it was noted that the validation was mainly happening at the client browser and the application required validation to occur at the business logic layer, in our case the WCF layer.
After a number of 500 errors coming up from IIS8 under Windows Server 2012, I final found the solution.
The solution was to go back to the Microsoft Server 2012 Dashboard and select the “Add Roles” feature. Scroll down to the root “Web Server (IIS)”, expand “Web Server”, expand “Application Development” and select “ASP.NET 3.5” and “ASP.NET 4.5” and “Install”.
Writing Effective Use Cases – by Alistair Cockburn.pdf (420.04 kb)
Use Case Template v0.1.docx (302.38 kb)