augustd / burp-suite-software-version-checks

Burp extension to passively scan for applications revealing software version numbers
30 stars 17 forks source link

Roxen CMS version #57

Closed Sjord closed 6 years ago

Sjord commented 6 years ago

Examples:

The text and pipe character don't always have the same styling. I want to make this regex generic, but I also worry that .* may be too loose. Any thoughts on this? Maybe just .{1,200} or some reasonable numbers?

Sjord commented 6 years ago

This works during test but not at runtime, because .* doesn't match newlines. It works during test because then newlines are stripped from the test file, which I changed in #58.

Sjord commented 6 years ago

Fixed. It now matches at most three lines (two line endings). I rebased it so that it correctly uses line endings in the test.

Sjord commented 6 years ago

Oh, this still isn't correct. I added another regex group but forgot to increase the group number for the version number.

augustd commented 6 years ago

Looking at both examples you provided, it seems like the major things that indicate a version string are "Roxen CMS", "|", and "version 123.4.5.6". Here is a regex that matches both test URLs:

Roxen CMS[\S\s]|[\S\s]version ([\d.]+)

See: http://www.regexplanet.com/cookbook/ahJzfnJlZ2V4cGxhbmV0LWhyZHNyEwsSBlJlY2lwZRiAgIDAoduWCQw/index.html

Is this version number always found within HTML text? To reduce false positives maybe you could maybe add the > and < for some additional context. Something like:

Roxen CMS<[\S\s]|[\S\s]version ([\d.]+)\s?<