998 research outputs found

    DETECTING APPLICATION ANOMALIES: MACHINE LEARNING APPROACH

    Get PDF
    In the modern era, world has completely relied on software technology. As software applications became highly demanded, security concerns have arrived. Application security has become one of the chief concerns where companies have to protect their systems from vulnerabilities. Various other securities include mobile or end-point security, operation system security and network security. All these security categories are intended to protect their users and clients from the malicious intents and hackers. Application security became a prime requirement. Security risks of the applications are enveloped and lead to direct threat to the available business. All the application vulnerabilities take the advantage to compromise the software application security. Once a flaw is been found and private data access is determined, attacker will have capability to exploit the software application vulnerability to facilitate cyber crimes. The confidentiality of the data, availability and integrity of resources are targeted by the cyber crimes (“What is Application Security?” 2019). Overall, more than 13% of the reviewed sites were compromised with the web application security vulnerabilities and they are not completely extinct even with the traditional security methodologies (Application Security Vulnerability, 2014). In order to resolve these numerous common security issues, few of the detection, remediation and prevention techniques are to be used which includes defensive programming, sophisticated input validation, dynamic checks, and static source code analysis. In this paper, runtime environment framework is been introduced. This research study extracted few publications. All the publications considered various approaches to resolve the issue. In this research paper framework, machine learning is utilized to train and predict the output. Firstly, a sample java code is executed in various CPU cores and the generated output files are collected. These output files are then used to train machine learning. Machine learning results are then compared with actual output for decision statement

    Invalidating web applications attacks by employing the right secure code

    Get PDF
    Tese de mestrado, Informática, Universidade de Lisboa, Faculdade de Ciências, 2019Desde o seu aparecimento, as aplicações web têm vindo a tornar-se cada vez mais populares e tornaram-se numa parte essencial das nossas vidas. Usamo-las todos os dias para fazer diversas tarefas tais como fazer compras, consultar o saldo da nossa conta bancária e entrar em contacto com os nossos familiares e amigos. Atualmente, as aplicações web são a forma mais utilizada para aceder aos serviços e recursos das organizações. No entanto, são conhecidas por conter vulnerabilidades no seu código-fonte. Estas vulnerabilidades, quando exploradas, podem causar danos severos às organizações como, por exemplo, o roubo de milhões de credenciais dos utilizadores e o acesso a informação confidencial, o que as torna num alvo apetecível para utilizadores mal intencionados. Por esta razão, é essencial que o acesso a serviços críticos tais como serviços de saúde e financeiros, seja feito através de aplicações web seguras. A utilização de código seguro nas aplicações é de uma importância extrema para obter aplicações seguras e garantir a segurança dos seus utilizadores. As vulnerabilidades são deixadas inadvertidamente no código-fonte por programadores porque estes não têm o conhecimento necessário para escrever código seguro ou porque os testes de software não dedicam tempo suficiente à segurança. Por outro lado, os programadores que utilizam nas suas aplicações funções seguras da linguagem de programação acreditam que as suas aplicações estão protegidas. No entanto, algumas destas funções não invalidam todos os ataques e deixam as aplicações vulneráveis. Este trabalho é focado na linguagem PHP porque esta é atualmente a linguagem de programação mais utilizada para o desenvolvimento de aplicações web. A linguagem PHP permite aos programadores realizarem ações que não seriam possíveis noutras linguagens, o que torna mais fácil aos programadores cometer erros. A linguagem PHP contém um grande número de funções seguras que podem ser utilizadas para remover vulnerabilidades dos diversos tipos. No entanto, uma grande maioria destas funções não é segura em todos os contextos ou é específica para um tipo de vulnerabilidade, o que cria a possibilidade de serem utilizadas incorretamente. Este problema torna mais fácil o aparecimento de vulnerabilidades se for tido em consideração o facto de uma grande parte dos cursos de programação existentes atualmente não dar ênfase suficiente à segurança. Por último, um outro fator que contribui para o aparecimento de vulnerabilidades é a complexidade das aplicações web atuais. Tal complexidade deve-se ao facto de as tecnologias disponíveis na web terem sofrido uma evolução significativa nos últimos anos, o que leva ao aumento da quantidade de linguagens de programação e funcionalidades que os programadores têm de conhecer. Atualmente, existe um grande número de ferramentas de análise estática destinadas a analisar código-fonte PHP e encontrar potenciais vulnerabilidades. Algumas destas ferramentas são baseadas em taint analysis e outras baseadas em análise dinâmica, execução simbólica, entre outras técnicas. Um problema conhecido destas ferramentas é o facto de, por vezes, reportarem vulnerabilidades que não são reais (falsos positivos), o que pode levar o programador a perder tempo à procura de problemas que não existem. Este tipo de ferramentas dá aos programadores relatórios em formatos variados e a esmagadora maioria delas deixa para o programador a tarefa de verificar se as vulnerabilidades reportadas são reais e removê-las caso o sejam. No entanto, muitas delas não dão informação sobre como remover as vulnerabilidades. Dado que muitos programadores estão mal informado acerca da escrita de código seguro, este processo nem sempre elimina as vulnerabilidades por completo. Apenas um pequeno número de ferramentas de análise estática realiza a correção automática do código-fonte das aplicações e as que o fazem muitas vezes têm limitações. Destas limitações, destaca-se o facto de inserirem código sintaticamente inválido que impede o funcionamento correto das aplicações, o que permite a introdução de melhorias nesta área. De entre os vários tipos de vulnerabilidades que podem ocorrer em aplicações web, os dois mais conhecidos são a injeção de SQL e o Cross-Site Scripting, que serão estudados em detalhe nesta dissertação. Esta dissertação tem dois objetivos principais: em primeiro lugar, estudar estes dois tipos de vulnerabilidades em aplicações web PHP, os diferentes ataques que as exploram e as diferentes formas de escrever código seguro para invalidar esses ataques através da utilização correta de funções seguras; em segundo lugar, desenvolver uma ferramenta capaz de inserir pequenas correções no código-fonte de uma aplicação web PHP de modo a remover vulnerabilidades sem alterar o comportamento original da mesma. As principais contribuições desta dissertação são as seguintes: um estudo dos diferentes tipos de ataques de injeção de SQL e Cross-Site Scripting contra aplicações web escritas em PHP; um estudo dos diferentes métodos de proteger aplicações web escritas em PHP e as situações em que os mesmos devem ser usados; o desenvolvimento de uma ferramenta capaz de remover vulnerabilidades de aplicações web escritas em PHP sem prejudicar o seu comportamento original; uma avaliação experimental da ferramenta desenvolvida com código PHP artificial gerado automaticamente e código PHP real. A solução proposta consiste no desenvolvimento de uma ferramenta de análise estática baseada em taint analysis que seja capaz de analisar programas PHP simplificados e, caso estejam vulneráveis, inserir linhas de código com correções simples que removam tais vulnerabilidades. Tudo isto sem alterar o comportamento original dos programas. A ferramenta desenvolvida limita-se exclusivamente à inserção de novas linhas de código, sem modificar as já existentes, para minimizar a probabilidade de tornar um programa sintaticamente inválido. Isto permite remover vulnerabilidades de aplicações web e, ao mesmo tempo, ensinar aos programadores como escrever código seguro. Os programas PHP simplificados que a ferramenta analisa consistem em ficheiros PHP contendo um único caminho do fluxo de controlo do programa original a que correspondem. Este programa simplificado não pode conter estruturas de decisão nem ciclos. A decisão de analisar programas simplificados foi tomada para permitir manter o foco desta dissertação na inserção de correções seguras, algo que atualmente apenas é feito por um pequeno número de ferramentas. Para avaliar a ferramenta desenvolvida, utilizámos cerca de 1700 casos de teste contendo código PHP artificial gerado automaticamente com vulnerabilidades de Cross-Site Scripting e seis aplicações web reais, escritas em PHP, contendo o mesmo tipo de vulnerabilidade. Foram também utilizados 100 casos de teste contendo código PHP artificial com vulnerabilidades de injeção de SQL. A ferramenta conseguiu analisar todos os ficheiros PHP. Relativamente à capacidade de a ferramenta inserir correções no código-fonte das aplicações, obtivemos resultados encorajadores: todos os ficheiros que foram corrigidos continham código PHP sintaticamente válido e apenas um ficheiro viu o seu comportamento original alterado. O ficheiro cujo comportamento foi alterado apresenta uma estrutura mais complexa do que a esperada para um programa simplificado, o que influenciou a execuc¸ ˜ao da nossa ferramenta neste caso. Relativamente à capacidade de a ferramenta detetar vulnerabilidades, verificámos que a mesma reportou algumas vulnerabilidades que não são reais. Tal situação aconteceu em parte devido ao uso de expressões regulares nas aplicações web, algo que causa muitas dificuldades a ferramentas de análise estática. Verificámos também que muitos dos falsos negativos (vulnerabilidades reais que não foram reportadas) se deveram ao contexto em que determinadas funções seguras são utilizadas, algo que, mais uma vez, causa muitas dificuldades a ferramentas deste tipo. As situações referidas aconteceram principalmente no código artificial, que não deve ser visto como representativo de aplicações web reais. Assim, podemos afirmar que a nossa ferramenta lida eficazmente com código PHP real, o que abre a porta à possibilidade de a mesma ser utilizada para corrigir vulnerabilidades em aplicações disponíveis ao público. Após esta avaliação experimental, concluímos que a solução desenvolvida cumpriu os objetivos principais para os quais foi concebida, ao ser capaz de remover vulnerabilidades sem prejudicar o comportamento original dos programas. A solução desenvolvida constitui uma melhoria nas capacidades das ferramentas de análise estática existentes atualmente, em especial das que realizam correção automática de código. O estudo realizado acerca destes dois tipos de vulnerabilidades permitiu também obter uma fonte de informação correta e confiável acerca das formas de escrever código seguro para prevenir os dois tipos de vulnerabilidades estudados em aplicações web escritas em PHP.Currently, web applications are the most common way to access companies’ services and resources. However, since their appearance, they are known to contain vulnerabilities in their source code. These vulnerabilities, when exploited, can cause serious damage to organizations, such as the theft of millions of user credentials and access to confidential data. For this reason, accessing critical services, such as health care and financial services, with safe web applications is crucial to its well-functioning. Often, vulnerabilities are left in the source code unintentionally by programmers because they do not have the necessary knowledge about how to write secure code. On the other hand, programmers that use secure functions from the programming language in their applications, employing thus secure code, believe that their applications are protected. However, some of those functions do not invalidate all attacks, leaving applications vulnerable. This dissertation has two main objectives: to study the diverse types of web application vulnerabilities, namely different attacks that exploit them, and different forms to build secure code for invalidating such attacks, and to develop a tool capable of protecting PHP web applications by inserting small corrections in their source code. The proposed solution was evaluated with both artificial and real code and the results showed that it can insert safe corrections while maintaining the original behavior of the web applications in the vast majority of the cases, which is very encouraging

    Detection of vulnerabilities and automatic protection for web applications

    Get PDF
    Tese de doutoramento, Informática (Ciências da Computação), Universidade de Lisboa, Faculdade de Ciências, 2016In less than three decades of existence, the Web evolved from a platform for accessing hypermedia to a framework for running complex web applications. These applications appear in many forms, from small home-made to large-scale commercial services such as Gmail, Office 365, and Facebook. Although a significant research effort on web application security has been on going for a while, these applications have been a major source of problems and their security continues to be challenged. An important part of the problem derives from vulnerable source code, often written in unsafe languages like PHP, and programmed by people without the appropriate knowledge about secure coding, who leave flaws in the applications. Nowadays the most exploited vulnerability category is the input validation, which is directly related with the user inputs inserted in web application forms. The thesis proposes methodologies and tools for the detection of input validation vulnerabilities in source code and for the protection of web applications written in PHP, using source code static analysis, machine learning and runtime protection techniques. An approach based on source code static analysis is used to identify vulnerabilities in applications programmed with PHP. The user inputs are tracked with taint analysis to determine if they reach a PHP function susceptible to be exploited. Then, machine learning is applied to determine if the identified flaws are actually vulnerabilities. In the affirmative case, the results of static analysis are used to remove the flaws, correcting the source code automatically thus protecting the web application. A new technique for source code static analysis is suggested to automatically learn about vulnerabilities and then to detect them. Machine learning applied to natural language processing is used to, in a first instance, learn characteristics about flaws in the source code, classifying it as being vulnerable or not, and then discovering and identifying the vulnerabilities. A runtime protection technique is also proposed to flag and block injection attacks against databases. The technique is implemented inside the database management system to improve the effectiveness of the detection of attacks, avoiding a semantic mismatch. Source code identifiers are employed so that, when an attack is flagged, the vulnerability is localized in the source code. Overall this work allowed the identification of about 1200 vulnerabilities in open source web applications available in the Internet, 560 of which previously unknown. The unknown vulnerabilities were reported to the corresponding software developers and most of them have already been removed.Em duas décadas de existência, a web evoluiu de uma plataforma para aceder a conteúdos hipermédia para uma infraestrutura para execução de aplicações complexas. Estas aplicações têm várias formas, desde aplicações pequenas e caseiras, a aplicações complexas e de grande escala e para diversos propósitos, como por exemplo serviços comerciais como o Gmail, Office 365 e Facebook. Apesar do grande esforço de investigação da última década em como tornar as aplicações web seguras, estas continuam a ser uma fonte de problemas e a sua segurança um desafio. Uma parte importante deste problema deriva de código fonte vulnerável, muitas vezes desenvolvido com linguagens de programação com poucas validações e construído por pessoas sem os conhecimentos mais adequados para uma programação segura. Atualmente a categoria de vulnerabilidades mais explorada é a de validação de input, diretamente relacionada com os dados (inputs) que os utilizadores inserem nas aplicações web. A tese propõe metodologias para a detecção e remoção de vulnerabilidades no código fonte e para a proteção das aplicações web em tempo de execução, empregando técnicas como a análise estática de código, aprendizagem máquina e protecção em tempo de execução. Numa primeira fase, a análise estática é utilizada para descobrir e identificar vulnerabilidades no código programado na linguagem PHP. Os inputs dos utilizadores são rastreados e é verificado se estes são parâmetros de funções PHP susceptíveis de serem exploradas. A combinação desta técnica com a aprendizagem máquina aplicada em minerização de dados é proposta para prever se as vulnerabilidades detectadas são falsos positivos ou reais. Caso sejam reais, o resultado da análise estática de código é utilizado para eliminá-las, corrigindo o código fonte automaticamente com fixes (remendos) e protegendo assim as aplicações web. A tese apresenta também uma nova técnica de análise estática de código para descobrir vulnerabilidades. A técnica aprende o que é código vulnerável e depois tira partido desse conhecimento para localizar problemas. A aprendizagem máquina aplicada ao processamento de linguagem natural é utilizada para, numa primeira instância, aprender aspectos que caracterizam as vulnerabilidades, para depois processar e analisar o código fonte, classificando-o como sendo ou não vulnerável, descobrindo e identificando os erros. Numa terceira fase, é proposta uma nova técnica de proteção em tempo de execução para descobrir e bloquear ataques de injeção contra bases de dados. A técnica é concretizada dentro do sistema de gestão de bases de dados para melhorar a eficácia na detecção dos ataques. É utilizada conjuntamente com identificadores de código fonte que, quando um ataque é sinalizado, permitem identificar a vulnerabilidade no programa. No total este trabalho permitiu a identificação de cerca de 1200 vulnerabilidades em aplicações web de código aberto disponíveis na Internet, das quais 560 eram até então desconhecidas. As vulnerabilidades desconhecidas foram reportadas aos autores do software onde foram encontradas e muitas delas já foram removidas

    Feature Set Selection for Improved Classification of Static Analysis Alerts

    Get PDF
    With the extreme growth in third party cloud applications, increased exposure of applications to the internet, and the impact of successful breaches, improving the security of software being produced is imperative. Static analysis tools can alert to quality and security vulnerabilities of an application; however, they present developers and analysts with a high rate of false positives and unactionable alerts. This problem may lead to the loss of confidence in the scanning tools, possibly resulting in the tools not being used. The discontinued use of these tools may increase the likelihood of insecure software being released into production. Insecure software can be successfully attacked resulting in the compromise of one or several information security principles such as confidentiality, availability, and integrity. Feature selection methods have the potential to improve the classification of static analysis alerts and thereby reduce the false positive rates. Thus, the goal of this research effort was to improve the classification of static analysis alerts by proposing and testing a novel method leveraging feature selection. The proposed model was developed and subsequently tested on three open source PHP applications spanning several years. The results were compared to a classification model utilizing all features to gauge the classification improvement of the feature selection model. The model presented did result in the improved classification accuracy and reduction of the false positive rate on a reduced feature set. This work contributes a real-world static analysis dataset based upon three open source PHP applications. It also enhanced an existing data set generation framework to include additional predictive software features. However, the main contribution is a feature selection methodology that may be used to discover optimal feature sets that increase the classification accuracy of static analysis alerts

    Static Code Analysis: On Detection of Security Vulnerabilities and Classification of Warning Messages

    Get PDF
    This thesis addresses several aspects of using static code analysis tools for detection of security vulnerabilities and faults within source code. First, the performance of three widely used static code analysis tools with respect to detection of security vulnerabilities is evaluated. This is done with the help of a large benchmarking suite designed to test static code analysis tools\u27 performance regarding security vulnerabilities. The performance of the three tools is also evaluated using three open source software projects with known security vulnerabilities. The main results of the first part of this thesis showed that the three evaluated tools do not have significantly different performance in detecting security vulnerabilities. 27% of C/C++ vulnerabilities along with 11% of Java vulnerabilities were not detected by any of the three tools. Furthermore, overall recall values for all three tools were close to or below 50% indicating performance comparable or worse than random guessing. These results were corroborated by the tools\u27 performance on the three real software projects. The second part of this thesis is focused on machine-learning based classification of messages extracted from static code analysis reports. This work is based on data from five real NASA software projects. A classifier is trained on increasing percentages of labeled data in order to emulate an on-going analysis effort for each of the five datasets. Results showed that classification performance is highly dependent on the distribution of true and false positives among source code files. One of the five datasets yielded good predictive classification regarding true positives. One more dataset led to acceptable performance, while the remaining three datasets failed to yield good results. Investigating the distribution of true and false positives revealed that messages were classified successfully when either only real faults and/or only false faults were clustered in files or were flagged by the same checker. The high percentages of false positive singletons (files or checkers that produced 0 true positives and 1 false negative) were found to negatively affect the classifier\u27s performance

    Monitoring web applications for vulnerability discovery and removal under attack

    Get PDF
    Tese de mestrado, Engenharia Informática (Arquitetura, Sistemas e Redes de Computadores) Universidade de Lisboa, Faculdade de Ciências, 2018Web applications are ubiquitous in our everyday lives, as they are deployed in the most diverse contexts and support a variety of services. The correctness of these applications, however, can be compromised by vulnerabilities left in their source code, often incurring in nefarious consequences, such as the theft of private data and the adulteration of information. This dissertation proposes a solution for the automatic detection and removal of vulnerabilities in web applications programmed in the PHP language. By monitoring the user interactions with the web applications with traditional attack discovery tools, it is possible to identify malicious inputs that are eventually provided by attackers. These in- puts are then explored by a directed static analysis approach, allowing for the discovery of potential security issues and the correction of bugs in the program. The solution was implemented and validated with a set of vulnerable web applications. The experimental results demonstrate that the tool is capable of detecting and correcting SQL Injection and XSS vulnerabilities. In total 174 vulnerabilities were found in 5 web applications, where 2 of these were previously unknown by the research community(i.e., they were ”zero-day” vulnerabilities)

    The approaches to quantify web application security scanners quality: A review

    Get PDF
    The web application security scanner is a computer program that assessed web application security with penetration testing technique. The benefit of automated web application penetration testing is huge, which web application security scanner not only reduced the time, cost, and resource required for web application penetration testing but also eliminate test engineer reliance on human knowledge. Nevertheless, web application security scanners are possessing weaknesses of low test coverage, and the scanners are generating inaccurate test results. Consequently, experimentations are frequently held to quantitatively quantify web application security scanner's quality to investigate the web application security scanner's strengths and limitations. However, there is a discovery that neither a standard methodology nor criterion is available for quantifying the web application security scanner's quality. Hence, in this paper systematic review is conducted and analysed the methodology and criterion used for quantifying web application security scanners' quality. In this survey, the experiment methodologies and criterions that had been used to quantify web application security scanner's quality is classified and review using the preferred reporting items for systematic reviews and meta-analyses (PRISMA) protocol. The objectives are to provide practitioners with the understanding of methodologies and criterions that available for measuring web application security scanners' test coverage, attack coverage, and vulnerability detection rate, while provides the critical hint for development of the next testing framework, model, methodology, or criterions, to measure web application security scanner quality

    A New View on Classification of Software Vulnerability Mitigation Methods

    Get PDF
    Software vulnerability mitigation is a well-known research area and many methods have been proposed for it Some papers try to classify these methods from different specific points of views In this paper we aggregate all proposed classifications and present a comprehensive classification of vulnerability mitigation methods We define software vulnerability as a kind of software fault and correspond the classes of software vulnerability mitigation methods accordingly In this paper the software vulnerability mitigation methods are classified into vulnerability prevention vulnerability tolerance vulnerability removal and vulnerability forecasting We define each vulnerability mitigation method in our new point of view and indicate some methods for each class Our general point of view helps to consider all of the proposed methods in this review We also identify the fault mitigation methods that might be effective in mitigating the software vulnerabilities but are not yet applied in this area Based on that new directions are suggested for the future researc

    A Hybrid Graph Neural Network Approach for Detecting PHP Vulnerabilities

    Full text link
    This paper presents DeepTective, a deep learning approach to detect vulnerabilities in PHP source code. Our approach implements a novel hybrid technique that combines Gated Recurrent Units and Graph Convolutional Networks to detect SQLi, XSS and OSCI vulnerabilities leveraging both syntactic and semantic information. We evaluate DeepTective and compare it to the state of the art on an established synthetic dataset and on a novel real-world dataset collected from GitHub. Experimental results show that DeepTective achieves near perfect classification on the synthetic dataset, and an F1 score of 88.12% on the realistic dataset, outperforming related approaches. We validate DeepTective in the wild by discovering 4 novel vulnerabilities in established WordPress plugins.Comment: A poster version of this paper appeared as https://doi.org/10.1145/3412841.344213
    corecore