UNIVERSITY OF TARTU FACULTY OF SCIENCE AND TECHNOLOGY INSTITUTE OF COMPUTER SCIENCE INFORMATICS. CVE Hiie-Helen Raju

Similar documents
Our sponsors Zequi V Autopsy of Vulnerabilities

Application vulnerabilities and defences

Attacks Against Websites 3 The OWASP Top 10. Tom Chothia Computer Security, Lecture 14

Vulnerability Management & Vulnerability Assessment. Nessus Attack Scripting Language (NASL). CVE databases, NVD database

Web Application Security. Philippe Bogaerts

Robust Defenses for Cross-Site Request Forgery Review

Attacks Against Websites. Tom Chothia Computer Security, Lecture 11

PROBLEMS IN PRACTICE: THE WEB MICHAEL ROITZSCH

COMP9321 Web Application Engineering

Advanced Web Technology 10) XSS, CSRF and SQL Injection

Progressive Authentication in ios

Security Research Advisory IBM WebSphere Portal Cross-Site Scripting Vulnerability

Andrew Muller, Canberra Managing Director, Ionize, Canberra The challenges of Security Testing. Security Testing. Taming the Wild West

JAMES BENNETT DJANGOCON EUROPE 3RD JUNE 2015 THE NET IS DARK AND FULL OF TERRORS

Application Security through a Hacker s Eyes James Walden Northern Kentucky University

PROBLEMS IN PRACTICE: THE WEB MICHAEL ROITZSCH

Robust Defenses for Cross-Site Request Forgery

MWR InfoSecurity Security Advisory. Oracle Enterprise Manager SQL Injection Advisory. 1 st February 2010

P2_L12 Web Security Page 1

CSCE 548 Building Secure Software SQL Injection Attack

Lecture 7: Web hacking 3, SQL injection, Xpath injection, Server side template injection, File inclusion

Web Security. Attacks on Servers 11/6/2017 1

Robust Defenses for Cross-Site Request Forgery

Perslink Security. Perslink Security. Eleonora Petridou Pascal Cuylaerts. System And Network Engineering University of Amsterdam.

Title: Multiple Remote Command Execution vulnerabilities on Avaya Intuity Audix LX (plus some client-side bugs)

Configuring User Defined Patterns

Web Applications Penetration Testing

Web basics: HTTP cookies

Pro ASP.NET MVC 2 Framework

How is state managed in HTTP sessions. Web basics: HTTP cookies. Hidden fields (2) The principle. Disadvantage of this approach

CIS 4360 Secure Computer Systems XSS

MWR InfoSecurity Security Advisory. DotNetNuke Cross Site Request Forgery Vulnerability Contents

Web 2.0 and AJAX Security. OWASP Montgomery. August 21 st, 2007

Your Turn to Hack the OWASP Top 10!

CHAPTER 8 CONCLUSION AND FUTURE ENHANCEMENTS

Solution of Exercise Sheet 5

Ranking Vulnerability for Web Application based on Severity Ratings Analysis

COMP9321 Web Application Engineering

Contents. xvii xix xxiil. xxvii

Symlink attacks. Do not assume that symlinks are trustworthy: Example 1

Reflected XSS Cross-Site Request Forgery Other Attacks

Solutions Business Manager Web Application Security Assessment

Web basics: HTTP cookies

DEFENSIVE PROGRAMMING. Lecture for EDA 263 Magnus Almgren Department of Computer Science and Engineering Chalmers University of Technology

Provide you with a quick introduction to web application security Increase you awareness and knowledge of security in general Show you that any

CS1520 Recitation: Security in Flask

WEB SECURITY: XSS & CSRF

RBS Axis Products Management Web Interface Multiple Vulnerabilities of 9

A (sample) computerized system for publishing the daily currency exchange rates

1. Oracle mod_plsql v in Oracle9i Application Server v1.0.2.x (Oracle9iAS v1.0.2.x)

Fortify Software Security Content 2017 Update 4 December 15, 2017

EasyCrypt passes an independent security audit

RBS NetGain Enterprise Manager Multiple Vulnerabilities of 11

Release Notes Version 7.8

Device Vulnerabilities in the Connected Home: Uncovering Remote Code Execution and More

Secure Programming Techniques

Building a Web-based Health Promotion Database

Web Security. Thierry Sans

INF3700 Informasjonsteknologi og samfunn. Application Security. Audun Jøsang University of Oslo Spring 2015

Cross-Site Request Forgery in Cisco SG220 series

Kenna Platform Security. A technical overview of the comprehensive security measures Kenna uses to protect your data

McAfee Certified Assessment Specialist Network

GOING WHERE NO WAFS HAVE GONE BEFORE

WatchGuard AP - Remote Code Execution

Penetration Testing following OWASP. Boyan Yanchev Chief Technology Ofcer Peter Dimkov IS Consultant

CNIT 129S: Securing Web Applications. Ch 12: Attacking Users: Cross-Site Scripting (XSS) Part 2

Is Browsing Safe? Web Browser Security. Subverting the Browser. Browser Security Model. XSS / Script Injection. 1. XSS / Script Injection

Detecting Insider Attacks on Databases using Blockchains

Abusing Windows Opener to Bypass CSRF Protection (Never Relay On Client Side)

CIS 700/002 : Special Topics : OWASP ZED (ZAP)

IERG 4210 Tutorial 07. Securing web page (I): login page and admin user authentication Shizhan Zhu

WordPress Security Plugins vs. WAF Services. A Comparative Test of WAF Accuracy in Security Solutions

GUI based and very easy to use, no security expertise required. Reporting in both HTML and RTF formats - Click here to view the sample report.

EPRI Software Development 2016 Guide for Testing Your Software. Software Quality Assurance (SQA)

IT Service Delivery and Support Week Three. IT Auditing and Cyber Security Fall 2016 Instructor: Liang Yao

Featuring. and. Göteborg. Ulf Larson Thursday, October 24, 13

Integrity attacks (from data to code): Malicious File upload, code execution, SQL Injection

OpenID Security Analysis and Evaluation

MWR InfoSecurity Advisory. 26 th April Elastic Path Administrative. Quit. Session Hijacking through Embedded XSS

CSE361 Web Security. Attacks against the server-side of web applications. Nick Nikiforakis

SECURITY TESTING. Towards a safer web world

Database Attacks, How to protect the corporate assets. Presented by: James Bleecker

OWASP TOP 10. By: Ilia

Application Security Introduction. Tara Gu IBM Product Security Incident Response Team

Flask Web Development Course Catalog

CS 155 Project 2. Overview & Part A

WEB SECURITY WORKSHOP TEXSAW Presented by Solomon Boyd and Jiayang Wang

SAP Security. BIZEC APP/11 Version 2.0 BIZEC TEC/11 Version 2.0

Certified Secure Web Application Engineer

MWR InfoSecurity Security Advisory. IBM WebSphere MQ - rrilookupget Remote Denial of Service Vulnerability. 4th March 2010

How to perform the DDoS Testing of Web Applications

Hacker Academy Ltd COURSES CATALOGUE. Hacker Academy Ltd. LONDON UK

Server Tailgating A Chosen- Plaintext Attack on RDP. - Eyal Karni - Yaron Zinar - Roman Blachman

Ethical Hacking. Content Outline: Session 1

Admin Login Log. User Guide. Compatibility: 1.5, 1.6, 1.7, 1.8, 1.9. Official Extension Page: Admin Login Log. User Guide: Admin Login Log Page 1

CNIT 129S: Securing Web Applications. Ch 10: Attacking Back-End Components

Secure Web App. 제목 : Secure Web Application v1.0 ( 채수민책임 ) Copyright 2008 Samsung SDS Co., Ltd. All rights reserved - 1 -

SQL Injection Attack Lab

Engineering Your Software For Attack

Bank Infrastructure - Video - 1

Transcription:

UNIVERSITY OF TARTU FACULTY OF SCIENCE AND TECHNOLOGY INSTITUTE OF COMPUTER SCIENCE INFORMATICS CVE-2013-2559 Hiie-Helen Raju Tartu 2017

Contents Introduction... 3 Vulnerability description... 3 Threat and exploitation... 3 Solution... 4 References... 6 2

Introduction Symphony CMS is a XSLT-powered open source content management system (CMS). (Symphony, n.d.) It provides users with tools for creating web applications. Symphony offers users an already set up project template where many things have already been implemented. In the project the toolkit package contains AuthorManager class, which manages Author type objects which differ from Manager type objects as they are stored in a database not in the file system. CRUD methods are implemented to allow Authors to be created (add), read (fetch), updated (edit) and deleted (delete). (Symphony CMS API, n.d.) Normally these methods can only be used by authenticated administrators to get their own data from the database. Vulnerability description CVE-2013-2559 is a SQL injection vulnerability in Symphony CMS before version 2.3.2. SQL injection is a common web hacking technique in which the attacker instead of inserting data inserts a malicious code with a SQL query into the software (for example a text field). The most common way is getting user data from other users with the following method. Example of SQL injection As 1=1 is always true, the request will always go through and all content from Users table will be returned. In CVE-2013-2559 the injection could be inserted through the HTTP GET sort parameter as arbitrary SQL commands. Threat and exploitation In Symphony, CVE-2013-2559 allows remote authenticated users to execute arbitrary SQL commands via the sort parameter to system/authors/. (CVE-2013-2559, n.d.) In Symphony the vulnerability existed (has now been fixed) because the filtration of HTTP GET parameter sort was not sufficient. SQL commands could be executed in the application database by an 3

authenticated administrator, including some that are not the designated use. (HTB23148 Security Advisory, n.d.) This Proof of Concept code would create a /var/www/file.txt file with user information from the authors table with logins, password hashes etc. There is another exploitation option for this vulnerability. Via CSRF (Cross-Site Request Forgery) vector and this time by a non-authenticated attacker. The attacker could trick any authenticated administrator to visit a site with the following exploit code. (HTB23148 Security Advisory, n.d.) SQL injection worked here so that the attacker used id%20into%20outfile%20%27/var/www/file.txt%27%20--%20 as the sort parameter value for the request. This would send it to the database which assumes that the content of this line is simply a sort request. While in reality the content sorts and asks for content to be written into a file. The file could be reached after from http://[host]/file.txt. This is based on the assumption that the web server serves content from the /var/www directory which is common in Unix-based systems. If this does not work, then other possible paths could be tried out. Solution To solve this kind of SQL injection the request has to be checked to match the type of input parameter that the developers wish to give the query. This means that a back-end validation has to be implemented in code level. The developers fixed this vulnerability in the next patch (2.3.2). There were two lines added the AuthorManager class code to fix this. The main idea behind them was to check the data type before it is passed on to the query. The sort parameter is stored in the $sortby variable and is checked to be null before id is assigned to the variable. If it is not null, then it is passed on to another method that cleans it before using it in the query. The order parameter is stored in $sortdirection variable and its content and type are compared to the string ASC. If it does not match, the value is replaced by DESC. 4

Source code for the vulnerability fix (Fix code in repository, n.d.) If the previously mentioned attack is used after this fix it will create a syntax error. The line id%20into%20outfile%20%27/var/www/file.txt%27%20--%20 is URL encoded and if it is to be decoded the %27 would translate as ' (one quotation mark). The cleanvalue method adds a backslash (\) before the quotation marks which renders the command syntax incorrect. (CleanValue code, n.d.) This fix is not the best solution for the SQL injection vulnerability (in the author s opinion) as there may be other injections that this might not protect against. The entire fetch method is as follows. Source code for the entire method (Fix code in repository, n.d.) A more thorough fix would be if the ORDER BY %s %s line would be changed into ORDER BY `%s` %s This would ensure that the id is an identifier and the id%20into%20outfile%20%27/var/www/file.txt%27%20--%20 part of the query would be read as `id INTO OUTFILE '/var/www/file.txt' -- ` (the entire line would be the id). However, this is not enough, as the ` mark could be added into the line. Therefore, the code should delete the ` marks from the line itself in the same method that it currently adds \ to the front of the marks. 5

References CleanValue code. (n.d.). Retrieved from https://github.com/symphonycms/symphony- 2/blob/6c8aa4e9c810994f7632837487426867ce50f468/symphony/lib/toolkit/class.mysql.php CVE-2013-2559. (n.d.). Retrieved from http://cve.mitre.org/cgi-bin/cvename.cgi?name=cve-2013-2559 Fix code in repository. (n.d.). Retrieved from https://github.com/symphonycms/symphony- 2/commit/6c8aa4e9c810994f7632837487426867ce50f468 HTB23148 Security Advisory. (n.d.). Retrieved from https://www.htbridge.com/advisory/htb23148 Symphony. (n.d.). Retrieved from http://www.getsymphony.com/ Symphony CMS API. (n.d.). Retrieved from http://www.getsymphony.com/learn/api/2.3.2/toolkit/authormanager/ Symphony sort parameter SQL injection. (n.d.). Retrieved from https://exchange.xforce.ibmcloud.com/vulnerabilities/83227 6