Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Remote File Inclusion Scanner


ghost's Avatar
0 0

Hi everybody,

I'm looking for a Remote File Inclusion Scanner, that scans my php documents and says if there is an vulnerability. Is there a tool which is possible to do that ?

Thank you for your answers

Greetz NoPax


ghost's Avatar
0 0

NoPax wrote: Is there a tool which is possible to do that ?

Yeah its called your brain. Oh yeah and its free too.


ghost's Avatar
0 0

Yeah funny and usefull =) But if you have a lot php files it's to much work to look through everyone. Perhaps there is a tool which scanns the files and say ther is one or not.

Greetz NoPax


ghost's Avatar
0 0

Not that I'm aware of. Learn about RFI, then write a quick prog to regex search your PHP file for an include statement that contains $ (looking for variables, basically). Tweak as necessary.


clone4's Avatar
Perl-6 Wisdom Seeker
0 0

NoPax wrote: Yeah funny and usefull =) But if you have a lot php files it's to much work to look through everyone. Perhaps there is a tool which scanns the files and say ther is one or not.

Greetz NoPax

I believe that there isn't such thing. There are RFI scanners, which request the server with for instance the most common types of rfi, like http://google.com/index.php?page=, and then determine whether there is the vulnerability or not, but file scanner, I don't think so. Anyway why do you need it, just switch off register_globals in php.ini. And if you really want one, then just write something that looks for every include function in the file, and if found, checks whether it is properly sanitized…

dammit too late:D


ghost's Avatar
0 0

I need it because it would save a lot of time if you look through new php projects and to find a vuln.

@Zaphir I can try to programm it, but I'm pretty sure it will not work =) And I have to read about this Regex in Wikipedia because I have never heard that before.

Greetz NoPax


ghost's Avatar
0 0

NoPax wrote: @Zephyr I can try to programm it, but I'm pretty sure it will not work =) And I have to read about this Regex in Wikipedia because I have never heard that before.

Regex = Regular Expression

It wouldn't be difficult at all. Just look up some quick references to regex and throw something together until one works.


ghost's Avatar
0 0

Yeah I will try it =) Is it possible to write it in VB 6 ? At time I don't have any other programming language on my notebook.

Greetz NoPax


spyware's Avatar
Banned
0 0

NoPax wrote: Yeah I will try it =) Is it possible to write it in VB 6 ? At time I don't have any other programming language on my notebook.

Greetz NoPax

Erh? You can just go ahead and download some stuff like, compilers, and such. You -could- do it in VB6.0, you -should- do it in Python/perl, or, PHP.


spyware's Avatar
Banned
0 0

Bad scwipt kiddy.

Vewwy bad indeed.


ghost's Avatar
0 0

cat filetoscan.php | grep -n include cat filetoscan.php | grep -n require_once

etc.


yours31f's Avatar
Retired
10 0

I might have to work on one of these, I really like the idea of have an LFI/RFI scanner.


Uber0n's Avatar
Member
0 0

NoPax wrote: I found some scripts and one programm. You would benefit a LOT more by writing this yourself. Also, it's a very basic thing (just some file IO and recognizing keywords), so it's a good beginner project B)


yours31f's Avatar
Retired
10 0

Uber0n wrote: so it's a good beginner project B)

Hey…

No I'm just kidding, I don't know tons about PHP so your right, That's one of the reasons I'm looking at making one. It seems like a good way to learn. Find something YOU want and would use, then learn what it takes to make it.


ghost's Avatar
0 0

Yes I will write the prog. But I found some I possted it. And it's good for learning.

So I will post maybe my prog when it's ready.

Greetz NoPax


Uber0n's Avatar
Member
0 0

NoPax wrote: Yes I will write the prog. But I found some I possted it. And it's good for learning.

So I will post maybe my prog when it's ready. Great. If you really do, respect B) ^^


ghost's Avatar
0 0

It wouldn't have any sense only to use that. So it's really easy to program. I will start tomorrow programming it. But next week I am away so it will be ready in two weeks =) And it's always good to learn new stuff =)

Greetz NoPax


Uber0n's Avatar
Member
0 0

NoPax wrote: It wouldn't have any sense only to use that. So it's really easy to program. I will start tomorrow programming it. But next week I am away so it will be ready in two weeks =) And it's always good to learn new stuff =) Exactly. I respect people who are ready to learn new things in order to solve their problems themselves, instead of just downloading premade tools ^^


ghost's Avatar
0 0

japanesedude wrote: cat filetoscan.php | grep -n include cat filetoscan.php | grep -n require_once

etc.

cat filetoscan.php | egrep -n –color=auto "include|require_once" grep uses regex. Why pound at the keyboard more than you need to. :)


ghost's Avatar
0 0

yeah your right but if you want to scan for example 100 files it is a lot of typing if you do it with grep

Greetz NoPax


ghost's Avatar
0 0

NoPax wrote: yeah your right but if you want to scan for example 100 files it is a lot of typing if you do it with grep

Then, put it in a Bash for loop with "*.php" and pipe the output to a file. It's simple.