projects
/
hashcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d7f8b35
)
added some checks to the -m 111 = nsldaps, SSHA-1(Base64), Netscape LDAP SSHA parser
author
philsmd
<philsmd@hashcat.net>
Fri, 11 Mar 2016 16:55:19 +0000
(17:55 +0100)
committer
philsmd
<philsmd@hashcat.net>
Fri, 11 Mar 2016 16:55:19 +0000
(17:55 +0100)
docs/changes.txt
patch
|
blob
|
history
src/shared.c
patch
|
blob
|
history
diff --git
a/docs/changes.txt
b/docs/changes.txt
index
9fb748f
..
231117b
100644
(file)
--- a/
docs/changes.txt
+++ b/
docs/changes.txt
@@
-151,6
+151,10
@@
Type.: Bug
File.: Host
Desc.: Fixed a bug in line counter: Conditional jump or move depends on uninitialised value
File.: Host
Desc.: Fixed a bug in line counter: Conditional jump or move depends on uninitialised value
+Type.: Bug
+File.: Host
+Desc.: Fixed some checks in the parser of -m 111 = nsldaps, SSHA-1(Base64), Netscape LDAP SSHA
+
* changes v2.00 -> v2.01:
Type.: Bug
* changes v2.00 -> v2.01:
Type.: Bug
diff --git
a/src/shared.c
b/src/shared.c
index
8c9f225
..
9932806
100644
(file)
--- a/
src/shared.c
+++ b/
src/shared.c
@@
-11639,9
+11639,15
@@
int sha1b64s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
int tmp_len = base64_decode (base64_to_int, (const u8 *) input_buf + 6, input_len - 6, tmp_buf);
int tmp_len = base64_decode (base64_to_int, (const u8 *) input_buf + 6, input_len - 6, tmp_buf);
+ if (tmp_len < 20) return (PARSER_HASH_LENGTH);
+
memcpy (digest, tmp_buf, 20);
memcpy (digest, tmp_buf, 20);
- salt->salt_len = tmp_len - 20;
+ int salt_len = tmp_len - 20;
+
+ if (salt_len < 0) return (PARSER_SALT_LENGTH);
+
+ salt->salt_len = salt_len;
memcpy (salt->salt_buf, tmp_buf + 20, salt->salt_len);
memcpy (salt->salt_buf, tmp_buf + 20, salt->salt_len);