[Práctica] RFI por localhost

Iniciado por 4lC0nR2, Diciembre 21, 2012, 02:17:44 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Este documento lo tenia hace tiempo, pero queria compartirlos con ustedes, una prueba de rfi en localhost, ya que este tipo de vulnerabilidad no se encuentra en muchas webs o casi ninguna ya que los servidores web tienen parcheado.

Creamos un archivo llamado rfi.php con este codigo:

Código: php
<?php

$archivo =  $_GET['secc'];

include($archivo);

?>


La variable vulnerable es $_GET['secc']

Para probar en localhost hacemos esto:

Hay que tener en ON estas funciones en el archivo php.ini:

Código: php
; Whether to allow the treatment of  URLs (like http:// or ftp://) as files.

allow_url_fopen = On



;  Whether to allow include/require to open URLs (like http:// or ftp://) as  files.

allow_url_include = On



; Whether or not to register the  EGPCS variables as global variables. You may

; want to turn this off if  you don't want to clutter your scripts' global scope

; with user data.  This makes most sense when coupled with track_vars - in which

; case you  can access all of the GPC variables through the $HTTP_*_VARS[],

;  variables.

;

; You should do your best to write your scripts so that  they do not require

; register_globals to be on; Using form variables as  globals can easily lead

; to possible security problems, if the code is  not very well thought of.

register_globals = On


Reiniciar nuestra pc para que los cambios surjan efecto.

Podemos vulnerarlo asi:

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta

Tambien con una imagen:

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta

Esto seria lo basico de un RFI, hoy en dia se encuentran muy pocas este tipo de vulnerabilidades por ultimas versiones recientes en los servidores.

Espero les haya gustado, para asi aportar mas posts.

Fuente: No tienes permitido ver los links. Registrarse o Entrar a mi cuenta