11.07.2015 Views

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

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.

96 Part II: Designing Secure <strong>Web</strong> <strong>Application</strong>sConsider Identity FlowConsider how your application will flow caller identity across multiple applicationtiers. You have two basic choices. You can flow the caller’s identity at the operatingsystem level using the Kerberos protocol delegation. This allows you to use operatingsystem level auditing. The drawback with this approach is that it affects scalabilitybecause it means there can be no effective database connection pooling at the middletier. Alternatively, you can flow the caller’s identity at the application level <strong>and</strong> usetrusted identities to access back-end resources. With this approach, you have to trustthe middle tier <strong>and</strong> there is a potential repudiation risk. You should generate audittrails in the middle tier that can be correlated with back-end audit trails. For this, youmust make sure that the server clocks are synchronized, although MicrosoftWindows 2000 <strong>and</strong> Active Directory do this for you.Log Key EventsThe types of events that should be logged include successful <strong>and</strong> failed logonattempts, modification of data, retrieval of data, network communications, <strong>and</strong>administrative functions such as the enabling or disabling of logging. Logs shouldinclude the time of the event, the location of the event including the machine name,the identity of the current user, the identity of the process initiating the event, <strong>and</strong> adetailed description of the event.Secure Log FilesSecure log files using Windows ACLs <strong>and</strong> restrict access to the log files. This makes itmore difficult for attackers to tamper with log files to cover their tracks. Minimize thenumber of individuals who can manipulate the log files. Authorize access only tohighly trusted accounts such as administrators.Back Up <strong>and</strong> Analyze Log Files RegularlyThere’s no point in logging activity if the log files are never analyzed. Log filesshould be removed from production servers on a regular basis. The frequency ofremoval is dependent upon your application’s level of activity. Your design shouldconsider the way that log files will be retrieved <strong>and</strong> moved to offline servers foranalysis. Any additional protocols <strong>and</strong> ports opened on the <strong>Web</strong> server for thispurpose must be securely locked down.

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

Saved successfully!

Ooh no, something went wrong!