71 research outputs found

    A Formal Approach to Exploiting Multi-Stage Attacks based on File-System Vulnerabilities of Web Applications (Extended Version)

    Full text link
    Web applications require access to the file-system for many different tasks. When analyzing the security of a web application, secu- rity analysts should thus consider the impact that file-system operations have on the security of the whole application. Moreover, the analysis should take into consideration how file-system vulnerabilities might in- teract with other vulnerabilities leading an attacker to breach into the web application. In this paper, we first propose a classification of file- system vulnerabilities, and then, based on this classification, we present a formal approach that allows one to exploit file-system vulnerabilities. We give a formal representation of web applications, databases and file- systems, and show how to reason about file-system vulnerabilities. We also show how to combine file-system vulnerabilities and SQL-Injection vulnerabilities for the identification of complex, multi-stage attacks. We have developed an automatic tool that implements our approach and we show its efficiency by discussing several real-world case studies, which are witness to the fact that our tool can generate, and exploit, complex attacks that, to the best of our knowledge, no other state-of-the-art-tool for the security of web applications can find

    AUTOMATED, SCHEDULED AND CI /CD WEB INJECTION

    Get PDF
    This report is made within the Curricular Unit (UC) Project, in the 2nd year of the Master in Cyber-security and Forensic Informatics (MCIF) provided by the Polytechnic Institute of Leiria (IPL). The purpose of this project is to study SQL Injection vulnerabilities in web applications. According to OWASP (Open Web Application Security Project) [20][19], this is one of the more prevalent attacks on web applications. As part of this work a web application was implemented, which can from a URL address, go through all the endpoints of the target application and test for SQL Injection vulnerabilities. The application also makes allows for scheduling of the tests and it is integrable with Continuous Integration / Continuous Delivery (CI/CD) environments. According to the literature on the subject, there are several algorithms that can be employed to test for existing SQL Injection vulnerabilities in a web application. In this document, we analyze them both from a theoretical and an implementation point of view. In order to better understand the subject, and produce a useful tool in this space. With the development of this project, we concluded that it is possible to integrate SQL vulnerability tests, with CI/CD pipeline and automate the development process of an application, with the execution of SQL injection tests in an automated way

    A detailed survey on various aspects of SQL injection in web applications: vulnerabilities, innovative attacks and remedies

    Get PDF
    In today’s world, Web applications play a very important role in individual life as well as in any country’s development. Web applications have gone through a very rapid growth in the recent years and their adoption is moving faster than that was expected few years ago. Now-a-days, billions of transactions are done online with the aid of different Web applications. Though these applications are used by hundreds of people, in many cases the security level is weak, which makes them vulnerable to get compromised. In most of the scenarios, a user has to be identified before any communication is established with the backend database. An arbitrary user should not be allowed access to the system without proof of valid credentials. However, a crafted injection gives access to unauthorized users. This is mostly accomplished via SQL Injection input. In spite of the development of different approaches to prevent SQL injection, it still remains an alarming threat to Web applications. In this paper, we present a detailed survey on various types of SQL Injection vulnerabilities, attacks, and their prevention techniques. Alongside presenting our findings from the study, we also note down future expectations and possible development of countermeasures against SQL Injection attacks

    An empirical comparison of commercial and open‐source web vulnerability scanners

    Get PDF
    Web vulnerability scanners (WVSs) are tools that can detect security vulnerabilities in web services. Although both commercial and open-source WVSs exist, their vulnerability detection capability and performance vary. In this article, we report on a comparative study to determine the vulnerability detection capabilities of eight WVSs (both open and commercial) using two vulnerable web applications: WebGoat and Damn vulnerable web application. The eight WVSs studied were: Acunetix; HP WebInspect; IBM AppScan; OWASP ZAP; Skipfish; Arachni; Vega; and Iron WASP. The performance was evaluated using multiple evaluation metrics: precision; recall; Youden index; OWASP web benchmark evaluation; and the web application security scanner evaluation criteria. The experimental results show that, while the commercial scanners are effective in detecting security vulnerabilities, some open-source scanners (such as ZAP and Skipfish) can also be effective. In summary, this study recommends improving the vulnerability detection capabilities of both the open-source and commercial scanners to enhance code coverage and the detection rate, and to reduce the number of false-positives

    OWASP Framework-based Network Forensics to Analyze the SQLi Attacks on Web Servers

    Get PDF
    One of dangerous vulnerabilities that attack the web is SQLi. With this vulnerability, someone can obtain user data information, then change and delete that data. The solution to this attack problem is that the design website must improve security by paying attention to input validation and installing a firewall. This study's objective is to use network forensic tools to examine the designlink website's security against SQLi attacks, namely Whois, SSL Scan, Nmap, OWASP Zap, and SQL Map. OWASP is the framework that is employed; it is utilized for web security testing. According to the research findings, there are 14 vulnerabilities in the design website, with five medium level, seven low level, and two informational level. When using SQL commands with the SQL Map tool to get username and password information on its web server design. The OWASP framework may be used to verify the security of websites against SQLi attacks using network forensic tools, according to the study's findings. So that information about the vulnerabilities found on the website can be provided. The results of this study contribute to forensic network knowledge against SQLi attacks using the OWASP framework as well as for parties involved in website security

    Efficient Assessment and Evaluation for Websites Vulnerabilities Using SNORT

    Get PDF
    An endless number of methods or ways exists to access illegally a web server or a website. The task of defending a system (e.g. network, server, website, etc.) is complex and challenging. SNORT is one of the popular open source tools that can be used to detect and possibly prevent illegal access and attacks for networks and websites. However, this largely depends on the way SNORT rules are designed and implemented. In this paper, we investigated in details several examples of SNORT rules and how they can be tuned to improve websites protection. We demonstrated practical methods to design and implement those methods in such ways that can show to security personnel how effectively can SNORT rules be used. Continuous experiments are conducted to evaluate and optimized the proposed rules. Results showed their ability to prevent tested network attacks. Each network should try to find the best set of rules that can detect and prevent most network attacks while at the same time cause minimal impact on network performance

    A Detailed Survey on Various Aspects of SQL Injection in Web Applications: Vulnerabilities, Innovative Attacks, and Remedies

    Get PDF
    In today’s world, Web applications play a very important role in individual life as well as in any country’s development. Web applications have gone through a very rapid growth in the recent years and their adoption is moving faster than that was expected few years ago. Now-a-days, billions of transactions are done online with the aid of different Web applications. Though these applications are used by hundreds of people, in many cases the security level is weak, which makes them vulnerable to get compromised. In most of the scenarios, a user has to be identified before any communication is established with the backend database. An arbitrary user should not be allowed access to the system without proof of valid credentials. However, a crafted injection gives access to unauthorized users. This is mostly accomplished via SQL Injection input. In spite of the development of different approaches to prevent SQL injection, it still remains an alarming threat to Web applications. In this paper, we present a detailed survey on various types of SQL Injection vulnerabilities, attacks, and their prevention techniques. Alongside presenting our findings from the study, we also note down future expectations and possible development of countermeasures against SQL Injection attacks

    Attacking web applications for dynamic discovering of vulnerabilities

    Get PDF
    Tese de Mestrado, Segurança Informática, 2022, Universidade de Lisboa, Faculdade de CiênciasAtualmente, a Internet faz parte do nosso dia a dia, sendo que as aplicações são criadas sobre a mesma. Estas aplicações oferecem múltiplos serviços que são usados para resolver diversos problemas na nossa vida, tal como falar com amigos nas redes sociais, comprar bilhetes para a nossa próxima viagem ou até mesmo verificar o estado da nossa conta bancária. Atualmente existem 1.8 mil milhões de websites ativos, número este que aumenta constantemente, visto que centenas de milhares de novos serviços são criados mensalmente. A grande maioria dos utilizadores destas aplicações, contudo, não está focada nos aspetos de segurança destes sistemas, visto que as funcionalidades destas é que os atraíram a utilizar as aplicações. Isto leva a que a prioridade das empresas seja oferecer o maior número de funcionalidades no menor espaço de tempo, dado que a variedade de funcionalidades é o que leva os utilizadores a comprar e utilizar os seus serviços. Com isto, as empresas são constantemente confrontadas entre criar novas funcionalidades ou melhorar a segurança das aplicações que desenvolvem, e muitas vezes as empresas colocam no mercado novas aplicações pouco testadas a nível de segurança e que apresentam vulnerabilidades. As startups são empresas que optam pelo desenvolvimento de funcionalidades. Nestas pequenas empresas, gastar tempo e dinheiro extra para criar aplicações sólidas e seguras, adiando as datas previstas de lançamento, pode levar à perda total do negócio, visto que a competição para colocar produtos novos no mercado é alta e a funcionalidade é mais valorizada do que a segurança destes. Além disso, o desenvolvimento das aplicações web está cada vez mais acessível, sendo mesmo possível para programadores que não têm grandes conhecimentos técnicos e de programação. O WordPress é um sistema de gestão de conteúdos que é usado para criar blogues e aplicações web de uma forma rápida e intuitiva, sendo assim um sistema apelativo para utilizadores sem, ou com pouca experiência em desenvolvimento de conteúdos web. O WordPress é desenvolvido em PHP, uma linguagem de script utilizada principalmente para processar os dados do lado do servidor. Estes dois elementos são os mais relevantes no desenvolvimento de aplicações web, uma vez que quase 80% usam PHP como linguagem de programação e, de todas estas aplicações PHP, 40% usa o WordPress para gerir os seus conteúdos. Contudo, apesar do seu elevado número de utilizadores, o PHP tem uma fraca validação dos dados, sendo necessário que os programadores tenham boas práticas de programação e que utilizem um conjunto de funções de sanitização para prevenir a inserção de vulnerabilidades no código. Programar em PHP sem gralhas, em termos de segurança de software, requer um elevado nível de conhecimentos técnicos da linguagem. Prova disto é que múltiplas vulnerabilidades presentes nos plugins do WordPress estão constantemente a ser descobertas e que afetam todas as aplicações que utilizem esses plugins vulneráveis. Se combinarmos esta falta de conhecimentos técnicos e más práticas com as limitações da linguagem e as vulnerabilidades existentes, acabamos por ter aplicações web com vulnerabilidades de segurança, que estão presentes na Internet à espera de serem exploradas por utilizadores maliciosos. Com a existência destes utilizadores constantemente a atacar as aplicações web, as empresas estão cada vez mais a implementar mecanismos de testes em fases tardias no desenvolvimento das aplicações. Apesar deste esforço, o número de vulnerabilidades encontradas continua a aumentar, tornando a segurança destas aplicações uma das suas principais preocupações. Vulnerabilidades de injeção, como Cross¬Site Scripting (XSS) e injeção de código SQL, continuam a estar muito presentes nestas aplicações, especialmente em aplicações pouco atualizadas. Prova disto é que estas vulnerabilidades estão em terceiro lugar no OWASP Top 10 2021, uma lista que contém as vulnerabilidades mais relevantes de momento. O impacto destas vulnerabilidades é enorme e pode resultar na exfiltração de informações sensíveis, perda de dados, ataques de negação de serviço, entre outros. As vulnerabilidades de XSS, apesar de terem um impacto mais moderado, foram encontradas em cerca de dois terços das aplicações, segundo estudos feitos pelo OWASP, revelando a sua grande prevalência na Internet. Apesar de estas vulnerabilidades serem já antigas e muito conhecidas, continuam a existir casos recentes com algumas aplicações que são usadas por milhões de utilizadores. As atuais abordagens para resolver este problema passam por mecanismos de fuzzing, que enviam valores erróneos para as aplicações e detetam vulnerabilidades baseado nas respostas das mesmas. Outras soluções seguem abordagens de análise estática, que analisam o código fonte das aplicações sem a execução do mesmo, e abordagens de execução simbólica que mapeiam as aplicações de forma simbólica para encontrar vulnerabilidades. Por fim, algumas abordagens utilizam oracles que são utilizadas para analisar os pedidos feitos às aplicações e definir se esses pedidos são tentativas de ataque. Apesar disto, estas abordagens têm algumas limitações: Fuzzing apenas envia valores incorretos para as aplicações e identifica vulnerabilidades baseado nas respostas, não fornecendo nenhuma informação extra de como a vulnerabilidade é explorada nem o código fonte que é vulnerável. O sucesso da análise estática depende do seu conhecimento das classes de vulnerabilidades a testar, assim como dos seus mecanismos para inspecionar o código fonte, que, se forem incorretamente aplicados podem levar a um elevado número de falsos positivos e negativos. Por fim, os oracles utilizam proxies que apenas identificam se um pedido é malicioso antes da sua execução na aplicação, não tendo conhecimento do fluxo de dados dentro da aplicação nem de como a vulnerabilidade é explorada. Esta dissertação pretende caracterizar como as vulnerabilidades de XSS e SQL injection podem ser identificadas no código fonte e como podem ser exploradas. Com esta informação, conseguimos identifica-las no código fonte das aplicações, sem ter de o inspecionar, se correlacionarmos a informação reportada pelos fuzzers com a informação recolhida pelo monitor na aplicação web, que monitoriza os pedidos recebidos e regista os caminhos de execução dos dados na aplicação. Nós avaliámos e explorámos alguns fuzzers com o código fonte disponível, criámos um conjunto de fuzzers para explorar as aplicações e melhorámos um monitor que funciona como debugger para recolher os caminhos de execução dos ataques. Os objetivos da tese e a forma de os concretizar são os seguintes. Primeiramente, é feito um estudo das vulnerabilidades mais comuns nas aplicações web, e como é possível explorá-las e identifica-las no código fonte da aplicação. Além disso, é feita uma análise soluções de fuzzing e injeção de código para aplicações PHP e é identificado como monitorizar estas soluções para recolher os caminhos de execução (traces) dos ataques, controlar o seu estado e explorar possíveis vulnerabilidades. Em segundo lugar, é feita uma melhoria numa extensão do XDebug de forma a poder corretamente identificar os caminhos de execução associados a vulnerabilidades de XSS. Finalmente, é implementada uma solução, com um conjunto de fuzzers, que injeta código malicioso nas aplicações, recolhe os seus traces e identifica se estes estão associados com ataques que conseguiram explorar vulnerabilidades com sucesso, através da correlação da informação dos traces com a informação dos ataques. Se estes estiverem associados a ataques, identifica as vulnerabilidades no código fonte da aplicação, sem o inspecionar, apresentando como resultados as vulnerabilidades encontradas e os ataques que levaram a essa exploração. A solução implementada contém um conjunto de três fuzzers (W3af, Wapiti e OWASP ZAP), os quais se complementam uns aos outros através da partilha dos seus resultados, obtidos na fase de crawling. Isto leva a uma melhoria posterior na fase de ataque porque páginas e pedidos que não foram encontrados por um fuzzer, mas que foram encontrados por outro, podem ser explorados, usufruindo assim da partilha dos resultados. Desta combinação de fuzzers obtivemos resultados interessantes, tais como a descoberta de vulnerabilidades que não seriam possíveis de identificar caso os fuzzers fossem executados individualmente. Enquanto os ataques decorrem, nós recolhemos os traços de execução gerados durante os ataques feitos pelos scanners, que contêm informação das movimentações dos dados dentro da aplicação web, especificamente desde o ponto de entrada do ataque até à chegada de funções sensíveis (funções que podem levar à exploração de vulnerabilidades). Com estes dados que recolhemos, conseguimos identificar os traços de execução que contêm os ataques que foram reportados como bem ¬sucedidos por parte dos fuzzers, confirmar que o valor malicioso utilizado no ataque atingiu uma função sensível e se conseguiu explorar uma vulnerabilidade com sucesso. Finalmente, conseguimos validar a veracidade dos ataques reportados pelos scanners, verificando se os ataques realmente atingiram uma função sensível, assim como apresentar os ataques que foram bem ¬sucedidos, o traço de execução que levou a essa exploração e a identificação da função vulnerável no código fonte da aplicação. Esta validação é possível devido à informação extra que os traços de execução contêm, nomeadamente os valores exatos que chegaram à chamada de funções e o comportamento posterior da aplicação a estes, sendo então possível identificar se a aplicação tomou um comportamento inesperado e identificar possíveis vulnerabilidades. A solução foi validada através do teste a três aplicações web com vulnerabilidades conhecidas. Os resultados das experiências revelam que a solução é capaz de identificar vulnerabilidades de SQL Injection e XSS, que não seriam reportadas caso cada fuzzer corresse independentemente dos outros. Para além disto, a solução foi capaz de confirmar a veracidade dos ataques reportados pelos fuzzers, assim como identificar falsos positivos nos seus relatórios.The vast majority of online services we use nowadays are provided by web applications to the users. The correctness of the source code of these applications is crucial to prevent attackers from exploiting the possible existing vulnerabilities they can contain, leading to severe consequences like the disclosure of sensitive information or the degradation of the availability of the service. Currently, multiple static analysis solutions analyse and detect vulnerabilities in the applications’ source code and are used by organisations to test their software. Malicious actors, however, do not usually have access to the source code of these applications and have to plan their attacks based on the information that is made public and fuzzing tools. This dissertation proposes a solution for the automatic detection of vulnerabilities in web applications written in PHP through an ensemble fuzzing approach and their identification in the source code without accessing it. Using an ensemble fuzzing of open¬source web fuzzers, the solution scans the target web applications and collects the application execution traces of the attacks carried by the fuzzers. Furthermore, it correlates the successful attacks reported by the fuzzers with the collected traces, identifying thus the traces in which such attacks happened. Afterwards, the solution inspects the resulting traces to evaluate the truthfulness of the attacks by checking if they successfully reached any sensitive sink (functions susceptible to be vulnerable to malicious inputs), and identifying, for these, the vulnerable code in the application. The solution was implemented and validated through the testing of three vulnerable web applications using three open¬source web application fuzzers for the ensemble. The experimental results demonstrate that it is capable of identifying SQL Injection and XSS vulnerabilities that would be missed if each fuzzer would run without the ensemble. Furthermore, the solution is capable of confirming the attacks reported by the fuzzers, as well as identifying false positives in their reports. Also, for the successful attacks checked, the solution is capable of identifying the vulnerable source code associated with the exploited vulnerabilities

    Model-Based Vulnerability Testing for Web Applications

    No full text
    International audienceThis paper deals with an original approach to automate Model-Based Vulnerability Testing (MBVT) for Web applications, which aims at improving the accuracy and precision of vulnerability testing. Today, Model-Based Testing techniques are mostly used to address functional features. The adaptation of such techniques for vulnerability testing defines novel issues in this research domain. In this paper, we describe the principles of our approach, which is based on a mixed modeling of the application under test: the specification indeed captures some behavioral aspects of the Web application, and includes vulnerability test purposes to drive the test generation algorithm. This approach is illustrated with the widely-used DVWA example
    corecore