Method and system for detection of remote file inclusion vulnerabilities
View Patent ↗A method for detecting remote file inclusion vulnerabilities in a web application includes altering of extracted resource references from a web application, submission of altered references as HTTP requests to the web application, inspection of corresponding HTTP responses, and diagnosis of vulnerability. A system of invention implements the method.
1. A method for identifying a vulnerability of a web application, comprising:
extracting a resource reference from a web application;
altering the extracted reference by supplying a uniform resource locator (URL) that references one of a plurality of entries in a repository;
sending the altered reference to the web application;
providing executable code for remote file inclusion within each of the plurality of entries in the repository, wherein the executable code within each of the plurality of entries instructs an interpreter of a different programming language to generate a signature; and
inspecting a response from the web application for presence of the signature to determine whether the web application executed the executable code, wherein the signature is unique for a given programming language.
2. A method according to claim 1 , wherein presence of the unique signature indicates that the web application employs an interpreter for a programming language corresponding to the unique signature.
3. A method according to claim 1 , further comprising identifying an injection point of the web application to be utilized in the act of sending the altered reference to the web application.
4. A method according to claim 3 , wherein the act of sending the altered reference to the web application comprises constructing an HTTP request based on the identified injection point having the altered reference.
5. A method according to claim 1 , wherein the act of sending the altered reference to the web application comprises constructing an HTTP request having the altered reference.
6. A method according to claim 1 , wherein the acts of altering the extracted reference and sending the altered reference to the web application are repeated for each of the plurality of entries in the repository.
7. A method according to claim 6 , wherein presence of the signature that is unique for a given programming language in the response indicates that the web application employs an interpreter for the given programming language.
8. A system for identifying a vulnerability of a web application, comprising:
a vulnerability detector that is adapted to extract a resource reference from the web application, alter the extracted reference, and send the altered reference to the web application;
a repository that stores executable code within a plurality of entries that are capable of being referenced by a uniform resource locator (URL) supplied as part of the altered reference, wherein the executable code within each of the plurality of entries instructs an interpreter of a different programming language to generate a signature,
wherein the vulnerability detector is further adapted to inspect a response from the web application for presence of the signature to determine whether the web application executed the executable code, wherein the signature is unique for a given programming language.
9. A system according to claim 8 , wherein presence of the unique signature indicates that the web application employs an interpreter for a programming language corresponding to the unique signature.
10. A system according to claim 8 , wherein the vulnerability detector is further adapted to identify an injection point of the web application to be utilized to send the altered reference to the web application.
11. A system according to claim 10 , wherein sending the altered reference to the web application comprises constructing an HTTP request based on the identified injection point having the altered reference.
12. A system according to claim 8 , wherein sending the altered reference to the web application comprises constructing an HTTP request having the altered reference.