375 lines
12 KiB
HTML
375 lines
12 KiB
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<meta charset="utf-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
<title>
|
||
|
|
Module: Msf::Exploit::SQLi
|
||
|
|
|
||
|
|
— Documentation by YARD 0.9.37
|
||
|
|
|
||
|
|
</title>
|
||
|
|
|
||
|
|
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
||
|
|
|
||
|
|
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
||
|
|
|
||
|
|
<script type="text/javascript">
|
||
|
|
pathId = "Msf::Exploit::SQLi";
|
||
|
|
relpath = '../../';
|
||
|
|
</script>
|
||
|
|
|
||
|
|
|
||
|
|
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
||
|
|
|
||
|
|
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
||
|
|
|
||
|
|
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div class="nav_wrap">
|
||
|
|
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
||
|
|
<div id="resizer"></div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="main" tabindex="-1">
|
||
|
|
<div id="header">
|
||
|
|
<div id="menu">
|
||
|
|
|
||
|
|
<a href="../../_index.html">Index (S)</a> »
|
||
|
|
<span class='title'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span> » <span class='title'><span class='object_link'><a href="../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span>
|
||
|
|
»
|
||
|
|
<span class="title">SQLi</span>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="search">
|
||
|
|
|
||
|
|
<a class="full_list_link" id="class_list_link"
|
||
|
|
href="../../class_list.html">
|
||
|
|
|
||
|
|
<svg width="24" height="24">
|
||
|
|
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||
|
|
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||
|
|
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||
|
|
</svg>
|
||
|
|
</a>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<div class="clear"></div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="content"><h1>Module: Msf::Exploit::SQLi
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</h1>
|
||
|
|
<div class="box_info">
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<dl>
|
||
|
|
<dt>Included in:</dt>
|
||
|
|
<dd><span class='object_link'><a href="Remote/HTTP/Wordpress/SQLi.html" title="Msf::Exploit::Remote::HTTP::Wordpress::SQLi (module)">Remote::HTTP::Wordpress::SQLi</a></span></dd>
|
||
|
|
</dl>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<dl>
|
||
|
|
<dt>Defined in:</dt>
|
||
|
|
<dd>lib/msf/core/exploit/sqli.rb<span class="defines">,<br />
|
||
|
|
lib/msf/core/exploit/sqli/common.rb,<br /> lib/msf/core/exploit/sqli/time_based_blind_mixin.rb,<br /> lib/msf/core/exploit/sqli/boolean_based_blind_mixin.rb</span>
|
||
|
|
</dd>
|
||
|
|
</dl>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<h2>Overview</h2><div class="docstring">
|
||
|
|
<div class="discussion">
|
||
|
|
|
||
|
|
<p>This mixin provides helpers to perform SQL injection</p>
|
||
|
|
<ul><li>
|
||
|
|
<p>provides a level of abstraction for common queries, for example, querying the table names</p>
|
||
|
|
</li><li>
|
||
|
|
<p>implements blind and time-based SQL injection in a reusable manner</p>
|
||
|
|
</li><li>
|
||
|
|
<p>Highly extendable (user can run any code to perform the requests, encode payloads and parse results)</p>
|
||
|
|
</li></ul>
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="tags">
|
||
|
|
|
||
|
|
|
||
|
|
</div><h2>Defined Under Namespace</h2>
|
||
|
|
<p class="children">
|
||
|
|
|
||
|
|
|
||
|
|
<strong class="modules">Modules:</strong> <span class='object_link'><a href="SQLi/BooleanBasedBlindMixin.html" title="Msf::Exploit::SQLi::BooleanBasedBlindMixin (module)">BooleanBasedBlindMixin</a></span>, <span class='object_link'><a href="SQLi/Mssqli.html" title="Msf::Exploit::SQLi::Mssqli (module)">Mssqli</a></span>, <span class='object_link'><a href="SQLi/MySQLi.html" title="Msf::Exploit::SQLi::MySQLi (module)">MySQLi</a></span>, <span class='object_link'><a href="SQLi/PostgreSQLi.html" title="Msf::Exploit::SQLi::PostgreSQLi (module)">PostgreSQLi</a></span>, <span class='object_link'><a href="SQLi/SQLitei.html" title="Msf::Exploit::SQLi::SQLitei (module)">SQLitei</a></span>, <span class='object_link'><a href="SQLi/TimeBasedBlindMixin.html" title="Msf::Exploit::SQLi::TimeBasedBlindMixin (module)">TimeBasedBlindMixin</a></span>, <span class='object_link'><a href="SQLi/Utils.html" title="Msf::Exploit::SQLi::Utils (module)">Utils</a></span>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<strong class="classes">Classes:</strong> <span class='object_link'><a href="SQLi/Common.html" title="Msf::Exploit::SQLi::Common (class)">Common</a></span>
|
||
|
|
|
||
|
|
|
||
|
|
</p>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<h2>
|
||
|
|
Instance Method Summary
|
||
|
|
<small><a href="#" class="summary_toggle">collapse</a></small>
|
||
|
|
</h2>
|
||
|
|
|
||
|
|
<ul class="summary">
|
||
|
|
|
||
|
|
<li class="public ">
|
||
|
|
<span class="summary_signature">
|
||
|
|
|
||
|
|
<a href="#create_sqli-instance_method" title="#create_sqli (instance method)">#<strong>create_sqli</strong>(dbms:, opts: {}, &query_proc) ⇒ Object </a>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</span>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<span class="summary_desc"><div class='inline'>
|
||
|
|
<p>Creates an SQL injection object, this is the method module writers should use.</p>
|
||
|
|
</div></span>
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
|
||
|
|
<li class="public ">
|
||
|
|
<span class="summary_signature">
|
||
|
|
|
||
|
|
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(info = {}) ⇒ Object </a>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</span>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<div id="instance_method_details" class="method_details_list">
|
||
|
|
<h2>Instance Method Details</h2>
|
||
|
|
|
||
|
|
|
||
|
|
<div class="method_details first">
|
||
|
|
<h3 class="signature first" id="create_sqli-instance_method">
|
||
|
|
|
||
|
|
#<strong>create_sqli</strong>(dbms:, opts: {}, &query_proc) ⇒ <tt>Object</tt>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</h3><div class="docstring">
|
||
|
|
<div class="discussion">
|
||
|
|
|
||
|
|
<p>Creates an SQL injection object, this is the method module writers should use</p>
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="tags">
|
||
|
|
<p class="tag_title">Parameters:</p>
|
||
|
|
<ul class="param">
|
||
|
|
|
||
|
|
<li>
|
||
|
|
|
||
|
|
<span class='name'>dbms</span>
|
||
|
|
|
||
|
|
|
||
|
|
<span class='type'>(<tt>Class</tt>)</span>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
—
|
||
|
|
<div class='inline'>
|
||
|
|
<p>The SQL injection class you intend to use</p>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
<li>
|
||
|
|
|
||
|
|
<span class='name'>opts</span>
|
||
|
|
|
||
|
|
|
||
|
|
<span class='type'>(<tt>Hash</tt>)</span>
|
||
|
|
|
||
|
|
|
||
|
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
||
|
|
|
||
|
|
|
||
|
|
—
|
||
|
|
<div class='inline'>
|
||
|
|
<p>The options to use with this SQL injection</p>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
<li>
|
||
|
|
|
||
|
|
<span class='name'>query_proc</span>
|
||
|
|
|
||
|
|
|
||
|
|
<span class='type'>(<tt>Proc</tt>)</span>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
—
|
||
|
|
<div class='inline'>
|
||
|
|
<p>The proc that takes an SQL payload as a parameter, and queries the server</p>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
<p class="tag_title">Returns:</p>
|
||
|
|
<ul class="return">
|
||
|
|
|
||
|
|
<li>
|
||
|
|
|
||
|
|
|
||
|
|
<span class='type'>(<tt>Object</tt>)</span>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
—
|
||
|
|
<div class='inline'>
|
||
|
|
<p>an instance of dbms</p>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
<p class="tag_title">Raises:</p>
|
||
|
|
<ul class="raise">
|
||
|
|
|
||
|
|
<li>
|
||
|
|
|
||
|
|
|
||
|
|
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
</div><table class="source_code">
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<pre class="lines">
|
||
|
|
|
||
|
|
|
||
|
|
25
|
||
|
|
26
|
||
|
|
27
|
||
|
|
28
|
||
|
|
29</pre>
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/sqli.rb', line 25</span>
|
||
|
|
|
||
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_create_sqli'>create_sqli</span><span class='lparen'>(</span><span class='label'>dbms:</span><span class='comma'>,</span> <span class='label'>opts:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_query_proc'>query_proc</span><span class='rparen'>)</span>
|
||
|
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Invalid dbms class</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_dbms'>dbms</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Class</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_dbms'>dbms</span><span class='period'>.</span><span class='id identifier rubyid_ancestors'>ancestors</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Msf::Exploit::SQLi (module)">SQLi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="SQLi/Common.html" title="Msf::Exploit::SQLi::Common (class)">Common</a></span></span><span class='rparen'>)</span>
|
||
|
|
|
||
|
|
<span class='id identifier rubyid_dbms'>dbms</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_datastore'>datastore</span><span class='comma'>,</span> <span class='id identifier rubyid_framework'>framework</span><span class='comma'>,</span> <span class='id identifier rubyid_user_output'>user_output</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_query_proc'>query_proc</span><span class='rparen'>)</span>
|
||
|
|
<span class='kw'>end</span></pre>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="method_details ">
|
||
|
|
<h3 class="signature " id="initialize-instance_method">
|
||
|
|
|
||
|
|
#<strong>initialize</strong>(info = {}) ⇒ <tt>Object</tt>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</h3><table class="source_code">
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
<pre class="lines">
|
||
|
|
|
||
|
|
|
||
|
|
9
|
||
|
|
10
|
||
|
|
11
|
||
|
|
12
|
||
|
|
13
|
||
|
|
14
|
||
|
|
15
|
||
|
|
16</pre>
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/sqli.rb', line 9</span>
|
||
|
|
|
||
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_info'>info</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
||
|
|
<span class='kw'>super</span>
|
||
|
|
<span class='id identifier rubyid_register_advanced_options'>register_advanced_options</span><span class='lparen'>(</span>
|
||
|
|
<span class='lbracket'>[</span>
|
||
|
|
<span class='const'><span class='object_link'><a href="../OptFloat.html" title="Msf::OptFloat (class)">OptFloat</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../OptBase.html#initialize-instance_method" title="Msf::OptBase#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>SqliDelay</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbracket'>[</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>The delay to sleep on time-based blind SQL injections</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='float'>1.0</span> <span class='rbracket'>]</span><span class='rparen'>)</span>
|
||
|
|
<span class='rbracket'>]</span>
|
||
|
|
<span class='rparen'>)</span>
|
||
|
|
<span class='kw'>end</span></pre>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="footer">
|
||
|
|
Generated on Fri May 8 17:01:05 2026 by
|
||
|
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||
|
|
0.9.37 (ruby-3.1.5).
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
</html>
|