Commit graph

27 commits

Author SHA1 Message Date
Andrew Davies
9db2f5a2af bug fixes and added cve-2014-0196 2014-05-19 00:18:10 +01:00
PenturaLabs
90a2a3d15e Update Linux_Exploit_Suggester.pl
CVE-2014-0038 added more vulnerable kernels
2014-02-22 18:28:25 +00:00
PenturaLabs
715cce405b added cve-2014-0038 2014-02-03 09:49:14 +00:00
Breno G. de Oliveira
659eb63178 bumping up new version and changelog 2013-09-05 17:53:52 -03:00
Breno G. de Oliveira
c25a397dee documenting the partial kernel feature 2013-09-05 17:51:49 -03:00
Breno G. de Oliveira
13aea29436 code tidying 2013-09-05 17:42:42 -03:00
Breno G. de Oliveira
ce59d76585 removing debug comment 2013-09-05 17:31:06 -03:00
Breno G. de Oliveira
3dd432d5e5 making sure the output is properly sorted
hash key ordering should not be relied upon, as this may pose
a security issue. Depending on the hash size and machine, the
perl interpreter might optimize the hash variable by changing the
key order. In more recent perls (5.18+), the hash keys order is
randomized at every run to make programs more secure. This means
the order of exploits shown was not guaranteed to be the same
for every user, or even for the same user on different runs of
the script. This patch sorts the keys, forcing them to always
be displayed on the same order.
2013-09-05 17:26:15 -03:00
Breno G. de Oliveira
bcccf168dd new feature: partial kernel matches!
now if the user provides a partial kernel such as "2.6" or
"2.", the script will understand it's a partial kernel and
show all matches, including the full vulnerable kernel version
next to the kernel name!
2013-09-05 17:24:17 -03:00
Breno G. de Oliveira
1cfcd779a4 optimization: stop looking at vuln after match
some exploits work with several different kernel versions. This
patch optimizes the code to move on to the next vuln after it
finds out that the current exploit works with the provided kernel.

This should provide a nice performance increase :)
2013-09-05 17:05:08 -03:00
Breno G. de Oliveira
5fed342665 minor marketing, showcasing the amount of exploits :) 2013-09-05 16:51:26 -03:00
Breno G. de Oliveira
2f2dc4dc56 putting $key inside the string
no need to concat here
2013-09-05 16:48:22 -03:00
Breno G. de Oliveira
ef1bfe921c removing code that's not used
the 'chop if' was not useful, as $kernel was not really
used afterwards.
2013-09-05 16:47:00 -03:00
Breno G. de Oliveira
cccf805438 use 'eq' instead of /^str$/
performance increase, plus it makes it more clear what it is doing :)
2013-09-05 16:45:47 -03:00
Breno G. de Oliveira
e47c99f9e0 removing extra (unnecessary) arrows 2013-09-05 16:41:08 -03:00
Breno G. de Oliveira
03f6d7636d get_kernel() and get_exploits() in, main() out
This is a minor maintainability update for the code. It provides
the get_kernel() and get_exploits() functions, and moves main()
to the top of the script. As such, developers are able to see
the complete logic of the code just by opening the file and
looking at the very first lines. The 'exit' at the end of the
code also guarantees that no extra data is processed, and the
rest are just auxiliary functions, created to provide extra
readability and maintainability.
2013-09-05 16:37:01 -03:00
Breno G. de Oliveira
89c6380ff7 modernizing the code a bit
As a good practice, post conditionals are used when there is
just a simple condition and a single result.

Also, Perl 5 recommends you call functions as 'name()' and not
as '&name', which is legacy from the very very *very*
old Perl 4 syntax (pre-1995), preserved simply for backwards
compatibility purposes.
2013-09-05 16:18:14 -03:00
Breno G. de Oliveira
e303fa852f minor tidying
double quotes require the parser to look if there are variables to
interpolate. Using single quotes when there are none is a good
practice both for the visual hint to the developer and as a
parsing hint to the perl interpreter.

Also, sequential 'print' statements might require extra IO and
clutter the code. It is recommended to either concatenate the
strings (as this patch does) or, if the text is too big, using
heredocs.
2013-09-05 16:14:39 -03:00
Breno G. de Oliveira
4cfff4a49f tidying the code
This patch makes the code much easier to read by applying perltidy
on the source. In particular, it makes the big exploit hash not
only easier to figure out but also to extend and even debug.

No code changes were made on this patch, just identation.
2013-09-05 15:54:44 -03:00
Breno G. de Oliveira
ccbc19f92c removing warnings for uninitialized values
when 'alt', 'cve' or 'mil' data is not available, the variables
contain the undefined value. As such, calling length() on them
trigger a warning. This patch changes the validation to simply
check if the variables are defined.
2013-09-05 15:48:25 -03:00
Breno G. de Oliveira
de0d186246 using strict and warnings
'strict' forces the developer to declare variables before use,
thus spotting some pretty hard to debug issues. 'warnings' trigger
warning (non-fatal) messages whenever perl things the code is
doing something that the developer did not intend, making the code
more maintainable.
2013-09-05 14:37:08 -03:00
Breno G. de Oliveira
458833d62f moving documentation to the __END__
The perl parser stops parsing after it finds an __END__ tag.
Moving the "pod" to the end should make things slightly faster
on slower machines. It also provides for better organization,
since you now get "code first, docs later" in your file.
2013-09-05 14:20:57 -03:00
PenturaLabs
0b7bae25db corrected URL , thanks paraboloid 2013-08-28 21:39:00 +01:00
PenturaLabs
ae09cf4777 added msr driver exploit 2013-08-28 21:37:03 +01:00
PenturaLabs
572322f470 Update Linux_Exploit_Suggester.pl
Minor Corrections
2013-08-26 19:42:41 +01:00
PenturaLabs
795e420012 Update Linux_Exploit_Suggester.pl
Updated milworm address to exploit-db addresses
2013-08-26 18:00:39 +01:00
Andrew Davies
7405b920db Inital code commit 2013-08-26 17:43:26 +01:00