| 1 |
{% extends "base.html" %} |
| 2 |
{% block title %}libinjection sqli diagnostic{% end %} |
| 3 |
{% block body %} |
| 4 |
<h1>libinjection {{ version }} diagnostics</h1> |
| 5 |
<p>Enter text to be analyzed in form below or directly modify the query string: </p> |
| 6 |
<form method="get"> |
| 7 |
<textarea class="form-control" name="id" rows="5">{{ formvalue }}</textarea><br/> |
| 8 |
<input class="btn" type="submit" name="type" value="fingerprints"></input> |
| 9 |
<input class="btn" type="submit" name="type" value="tokens"></input> |
| 10 |
</form> |
| 11 |
{% if len(args) %} |
| 12 |
<div> |
| 13 |
<h2 style="float:left">SQLi Detected: {{ is_sqli }} </h2> |
| 14 |
<div style="float:right; font-size: large; margin: 10px; padding: 6px; border: 0px solid black; background-color: #eee"> |
| 15 |
{% if is_sqli %} |
| 16 |
<a href="/doc-sqli-false-positive">Is this wrong?</a> |
| 17 |
{% else %} |
| 18 |
<a href="/doc-sqli-false-negative">Is this wrong?</a> |
| 19 |
{% end %} |
| 20 |
</div> |
| 21 |
</div> |
| 22 |
<br style="clear:both"> |
| 23 |
<table class="table"> |
| 24 |
<tr><th>name</th><th>value</th><th>sqli?</th><th>fingerprint</th></tr> |
| 25 |
{% for arg in args %} |
| 26 |
{% if arg[2] %} |
| 27 |
<tr class="danger"> |
| 28 |
{% else %} |
| 29 |
<tr class="success"> |
| 30 |
{% end %} |
| 31 |
<td>{{ arg[0] }}</td><td>{{ arg[1] }}</td><td>{{ arg[2] }}</td><td>{{ arg[3] }}</td></tr> |
| 32 |
{% end %} |
| 33 |
</table> |
| 34 |
{% end %} |
| 35 |
|
| 36 |
|
| 37 |
<hr/> |
| 38 |
<h2>Fingerprints in all contexts</h2> |
| 39 |
|
| 40 |
{% for name, v in allfp.iteritems() %} |
| 41 |
|
| 42 |
<div style="margin: 2px; border: 1px solid black"> |
| 43 |
<h2>query string: "{{ name }}"</h2> |
| 44 |
<p><b><code>{{ v['value'] }}</code></b></p> |
| 45 |
|
| 46 |
<table class="table"> |
| 47 |
<tr><th>quoting context</th><th>comment style</th><th>is sqli</th><th>fingerprint</th></tr> |
| 48 |
{% for arg in v['fingerprints'] %} |
| 49 |
{% if arg[2] %} |
| 50 |
<tr class="danger"> |
| 51 |
{% else %} |
| 52 |
<tr class="success"> |
| 53 |
{% end %} |
| 54 |
<td>{{ arg[0] }}</td> |
| 55 |
<td>{{ arg[1] }}</td> |
| 56 |
<td>{{ arg[2] }}</td> |
| 57 |
<td>{{ arg[3] }}</td> |
| 58 |
</tr> |
| 59 |
{% end %} |
| 60 |
</table> |
| 61 |
</div> |
| 62 |
{% end %} |
| 63 |
|
| 64 |
<h2>Notes:</h2> |
| 65 |
<ul> |
| 66 |
|
| 67 |
<li>The form is a convience for ad-hoc testing. In addition, you can |
| 68 |
also enter any input by directly modifying the query string. There is |
| 69 |
no CSRF token.</li> |
| 70 |
|
| 71 |
<li>All query string <i>values</i> are analyzed. Query string |
| 72 |
parameter <i>names</i> are not. This isn't a WAF but a diagnostic |
| 73 |
tool for libinjection.</li> |
| 74 |
|
| 75 |
<li>Input is URL-decoded <i>twice</i>, to help prevent cut-n-paste issues.</li> |
| 76 |
|
| 77 |
<li>No attempt at processing hex or base64 encoded input is done.</li> |
| 78 |
|
| 79 |
</ul> |
| 80 |
{% end %} |