luh2 / DetectDynamicJS

The DetectDynamicJS Burp Extension provides an additional passive scanner that tries to find differing content in JavaScript files and aid in finding user/session data.
GNU General Public License v3.0
65 stars 19 forks source link

Reduce false positives and number of requests sent #16

Closed soffensive closed 5 years ago

soffensive commented 5 years ago

1) Reduce false positives by using a different approach for detecting JavaScript extensions. The current way will, for example, detect "jspa" as a script file. Another approach would be a more sophisticated way, for example, by rating/weighing the different criteria (content-type, file extension, mime-type ...)

2) Reduce number of requests sent by the extension by examining whether there is any authentication information in the base request at all.

soffensive commented 5 years ago

I just noticed for number 2) there is already a method hasAuthenticationCharacteristic, but it does not seem to work.

soffensive commented 5 years ago

It seems there is an incorrect not that will cause the hasAuthenticationCharacteristic to always return true:

return any(h for h in self.ifields if h not in str(hfields).lower())

This coding style makes it hard to discover bugs / determine the actual behaviour since the any() is error-prone and there are too many statements in a single line

luh2 commented 5 years ago

Awesome pull request as usual! Thanks. It's merged.