Revisiting regexes for DBMS errors

This commit is contained in:
Miroslav Stampar 2017-09-20 15:28:33 +02:00
parent 44664dd7d6
commit afc2a42383
3 changed files with 33 additions and 29 deletions

View File

@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.1.9.20"
VERSION = "1.1.9.21"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -46,7 +46,7 @@ a44d7a4cc6c9a67a72d6af2f25f4ddac lib/core/exception.py
d8e9250f3775119df07e9070eddccd16 lib/core/replication.py
785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py
40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py
ef5cf593cd595b00fadb67e5004de5c0 lib/core/settings.py
1b0c524c75375ae969a357cbc9e83b72 lib/core/settings.py
d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py
2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py
effc153067a00bd43461bfc1cdec1122 lib/core/target.py
@ -453,7 +453,7 @@ d989813ee377252bca2103cea524c06b xml/banner/sharepoint.xml
350605448f049cd982554123a75f11e1 xml/banner/x-aspnet-version.xml
817078783e1edaa492773d3b34d8eef0 xml/banner/x-powered-by.xml
fb93505ef0ab3b4a20900f3e5625260d xml/boundaries.xml
535d625cff8418bdc086ab4e1bbf5135 xml/errors.xml
9567590d35dfd9f214b9979e6000b139 xml/errors.xml
a279656ea3fcb85c727249b02f828383 xml/livetests.xml
14a2abeb88b00ab489359d0dd7a3017f xml/payloads/boolean_blind.xml
b5b8b0aebce810e6cdda1b7106c96427 xml/payloads/error_based.xml

View File

@ -3,8 +3,8 @@
<root>
<!-- MySQL -->
<dbms value="MySQL">
<error regexp="SQL syntax.*MySQL"/>
<error regexp="Warning.*mysql_.*"/>
<error regexp="SQL syntax.*?MySQL"/>
<error regexp="Warning.*?mysql_"/>
<error regexp="MySqlException \(0x"/>
<error regexp="valid MySQL result"/>
<error regexp="check the manual that corresponds to your (MySQL|MariaDB) server version"/>
@ -14,24 +14,24 @@
<!-- PostgreSQL -->
<dbms value="PostgreSQL">
<error regexp="PostgreSQL.*ERROR"/>
<error regexp="Warning.*\Wpg_.*"/>
<error regexp="PostgreSQL.*?ERROR"/>
<error regexp="Warning.*?\Wpg_"/>
<error regexp="valid PostgreSQL result"/>
<error regexp="Npgsql\."/>
<error regexp="PG::SyntaxError:"/>
<error regexp="org\.postgresql\.util\.PSQLException"/>
<error regexp="ERROR:\s\ssyntax error at or near "/>
<error regexp="ERROR:\s\ssyntax error at or near"/>
</dbms>
<!-- Microsoft SQL Server -->
<dbms value="Microsoft SQL Server">
<error regexp="Driver.* SQL[\-\_\ ]*Server"/>
<error regexp="OLE DB.* SQL Server"/>
<error regexp="Driver.*? SQL[\-\_\ ]*Server"/>
<error regexp="OLE DB.*? SQL Server"/>
<error regexp="\bSQL Server[^&lt;&quot;]+Driver"/>
<error regexp="Warning.*(mssql|sqlsrv)_"/>
<error regexp="Warning.*?(mssql|sqlsrv)_"/>
<error regexp="\bSQL Server[^&lt;&quot;]+[0-9a-fA-F]{8}"/>
<error regexp="System\.Data\.SqlClient\.SqlException"/>
<error regexp="(?s)Exception.*\WRoadhouse\.Cms\."/>
<error regexp="(?s)Exception.*?\WRoadhouse\.Cms\."/>
<error regexp="Microsoft SQL Native Client error '[0-9a-fA-F]{8}"/>
<error regexp="com\.microsoft\.sqlserver\.jdbc\.SQLServerException"/>
<error regexp="ODBC SQL Server Driver"/>
@ -53,16 +53,17 @@
<dbms value="Oracle">
<error regexp="\bORA-\d{5}"/>
<error regexp="Oracle error"/>
<error regexp="Oracle.*Driver"/>
<error regexp="Warning.*\Woci_.*"/>
<error regexp="Warning.*\Wora_.*"/>
<error regexp="Oracle.*?Driver"/>
<error regexp="Warning.*?\Woci_"/>
<error regexp="Warning.*?\Wora_"/>
<error regexp="oracle\.jdbc\.driver"/>
<error regexp="quoted string not properly terminated"/>
<error regexp="SQL command not properly ended"/>
</dbms>
<!-- IBM DB2 -->
<dbms value="IBM DB2">
<error regexp="CLI Driver.*DB2"/>
<error regexp="CLI Driver.*?DB2"/>
<error regexp="DB2 SQL error"/>
<error regexp="\bdb2_\w+\("/>
<error regexp="SQLSTATE.+SQLCODE"/>
@ -70,7 +71,7 @@
<!-- Informix -->
<dbms value="Informix">
<error regexp="Exception.*Informix"/>
<error regexp="Exception.*?Informix"/>
<error regexp="Informix ODBC Driver"/>
<error regexp="com\.informix\.jdbc"/>
<error regexp="weblogic\.jdbc\.informix"/>
@ -79,51 +80,54 @@
<!-- Interbase/Firebird -->
<dbms value="Firebird">
<error regexp="Dynamic SQL Error"/>
<error regexp="Warning.*ibase_.*"/>
<error regexp="Warning.*?ibase_"/>
</dbms>
<!-- SQLite -->
<dbms value="SQLite">
<error regexp="SQLite/JDBCDriver"/>
<error regexp="SQLite\.Exception"/>
<error regexp="System\.Data\.SQLite\.SQLiteException"/>
<error regexp="Warning.*sqlite_.*"/>
<error regexp="Warning.*SQLite3::"/>
<error regexp="(Microsoft|System)\.Data\.SQLite\.SQLiteException"/>
<error regexp="Warning.*?sqlite_"/>
<error regexp="Warning.*?SQLite3::"/>
<error regexp="\[SQLITE_ERROR\]"/>
<error regexp="SQLite error \d+:"/>
<error regexp="sqlite3.OperationalError:"/>
</dbms>
<!-- SAP MaxDB -->
<dbms value="SAP MaxDB">
<error regexp="SQL error.*POS([0-9]+).*"/>
<error regexp="Warning.*maxdb.*"/>
<error regexp="SQL error.*?POS([0-9]+)"/>
<error regexp="Warning.*?maxdb"/>
</dbms>
<!-- Sybase -->
<dbms value="Sybase">
<error regexp="Warning.*sybase.*"/>
<error regexp="Warning.*?sybase"/>
<error regexp="Sybase message"/>
<error regexp="Sybase.*Server message.*"/>
<error regexp="Sybase.*?Server message"/>
<error regexp="SybSQLException"/>
<error regexp="com\.sybase\.jdbc"/>
</dbms>
<!-- Ingres -->
<dbms value="Ingres">
<error regexp="Warning.*ingres_"/>
<error regexp="Warning.*?ingres_"/>
<error regexp="Ingres SQLSTATE"/>
<error regexp="Ingres\W.*Driver"/>
<error regexp="Ingres\W.*?Driver"/>
</dbms>
<!-- Frontbase -->
<dbms value="Frontbase">
<error regexp="Exception (condition )?\d+. Transaction rollback."/>
<error regexp="Exception (condition )?\d+\. Transaction rollback"/>
<error regexp="com\.frontbase\.jdbc"/>
</dbms>
<!-- HSQLDB -->
<dbms value="HSQLDB">
<error regexp="org\.hsqldb\.jdbc"/>
<error regexp="Unexpected end of command in statement \["/>
<error regexp="Unexpected token.*in statement \["/>
<error regexp="Unexpected token.*?in statement \["/>
</dbms>
</root>