API Best Practices Blog
API threat protection pack: 10 XML attack types to guard against »

The cost of IT security breaches has almost doubled from 2008 according to this piece via ComputerWorld Canada.
While we'd love to tell you this is just a problem for our Canadian friends - unfortunately we all need to understand API attack types.
(Remember in our Cloud security tech talks last week we saw that for breaches over a certain size you may even need to issue a press release!)
Here are 10 threats that we cover in our API threat protection policy pack.
1. Malicious Code Injection: exploits backend services that use SQL/LDAP/ XPATH/ XQuery statements from user-supplied input. Servicenet ‘s Malicous Code Injection Detection policy can filter SQL,LDAP, XPATH, XQUERY injection or use Custom Regular Expression, XPATH and XSD technologies to filter the request further. It also can integrate with anti-virus products to scan for virus in the API requests especially in the attachements or mime contents.
2. DOS Attacks: Denial of Service (DoS) intends to prevent an API or Service from serving normal user activity. These malicious attacks includes mega-message and entities attack, recursive element attack, request flooding, larger volume of invalid requests etc. The ServiceNet Message Payload protection policy detects various kind of DOS attacks and protect the backend from the attacker.
3. Service Information Leakage: APIs can unintentionally leak information about their configuration, internal workings, or violate privacy through a variety of service errors. For example verbose and informative error messages may result in data leakage, and the information revealed could be used to formulate the next level of attack. ServiceNet response Message control policies can customize fault/response message reaching the client which can weed out this attack.
4. Broken Authentication, Session id and Keys: Proper authentication, API key and session management is critical to service security. Flaws in this area most frequently involve the failure to authenticate (weak or multiple adhoc authentication schemes), weak session/key tokens that helps attacker to replay or fake the keys or tokens. ServiceNet’s authentication and API key management policies provides single point strong authentications and key generation techniques that frees-up API developer from attack risks.
5. Failure to protect API and corresponding Data access: Frequently, authorization is based only on base URI or operation of API. An attacker can try passing various parameters to this API operation and get access to the data that he not authorized to access. ServiceNet fle xible authorization policies supports authorization based on various request parameters/data not just URI or Operation name.
6 API Data snooping: Failure to encrypt sensitive API communications means that an attacker who can sniff traffic from the network will be able to access the conversation, including any credentials or sensitive information transmitted. Servicenet’s SSL or XML encryption policies can be used to secure the API data from getting snooped in the communication path.
7. API Request and Response tampering: The API data tampering attack is based on the manipulation of API request and response parameters exchanged between client and services in order to modify application data, such as user credentials and permissions, price and quantity of products, etc. Usually, this information is part of HTTP URI or Header or Body(XML or non-xml). Servicenet’s SSL or XML signature policies can be used to secure the API request and response message from getting tampered in the communication path.
8. Request Burst: Spikes in API requests might bring down the backend server. Spike Arresting and caching helps the backend services to perform better under various load conditions.
9. Auditing: If your API is going to be handling money, you may be required by law to adhere to certain security practices and regulations. One important regulation is auditing every (full or part of) request or response from authorized and unauthorized users. ServiceNet auditing policy supports very flexible way to log API audit data in various formats to different destinations like Local disk, NFS, Syslog, JMS or Web Services.
10. Threat Detection and Analysis: Analyzing the threat data is important to find the failures and fix those failures on the API infrastructure. ServiceNet’s analytics policy provides capability to visualize and analyze various API errors or failures. It can also provide various patterns or rates of these failures that help an architect or developer to fix the problem in his or her API.
For more on API security and threat protection, check out our compliation of API roadmap issues - Is your API Naked? And let us know if you like to see the demo of this policy pack in action.
(Senthil Doraiswamy is a product manager at Sonoa Systems.)
(And thanks misocrazy to for the photo..)



