update20181223

20181223 V1.0 正式版---
修复由于少数网站只支持TSL1.1和1.2版本,导致HTTPS发包失败的问题,增加HTTPS使用TSL1.1和1.2版本。
注意:由于.net framework 4.0不支持TSL1.1和1.2版本,您必须安装.net framework 4.0以上本版本,建议安装.net framework 4.5或.net framework 4.6版本
注意:由于XP/Server 03不能安装.net framework 4.0以上版本,所以暂时无法支持HTTPS TSL1.1和1.2版本,程序编译暂时还是使用.net framework 4.0,兼容XP/Server 03,所以在XP/Server 03暂时不支持HTTPS使用TSL1.1和1.2版本,可能导致少数情况无法进行https发包。
This commit is contained in:
shack2
2018-12-23 14:28:58 +08:00
parent b18f7b73f9
commit cdec7858bd
6 changed files with 36 additions and 34 deletions

View File

@@ -233,7 +233,6 @@
this.bypass_delselect = new System.Windows.Forms.ToolStripMenuItem();
this.bypass_btn_addReplaceStr = new System.Windows.Forms.Button();
this.label19 = new System.Windows.Forms.Label();
this.tab_useDB = new System.Windows.Forms.TabPage();
this.tab_encoding = new System.Windows.Forms.TabPage();
this.groupBox13 = new System.Windows.Forms.GroupBox();
this.label21 = new System.Windows.Forms.Label();
@@ -1631,7 +1630,7 @@
this.tsmi_changeRequestMethod,
this.tsmi_createPackByURL});
this.cms_dataPacks.Name = "cms_dataPacks";
this.cms_dataPacks.Size = new System.Drawing.Size(184, 92);
this.cms_dataPacks.Size = new System.Drawing.Size(184, 114);
this.cms_dataPacks.Text = "复制数据";
//
// tsmi_createGetTemplate
@@ -2117,7 +2116,6 @@
this.mytab.Controls.Add(this.tab_file);
this.mytab.Controls.Add(this.tab_cmd);
this.mytab.Controls.Add(this.tab_bypass);
this.mytab.Controls.Add(this.tab_useDB);
this.mytab.Controls.Add(this.tab_encoding);
this.mytab.Controls.Add(this.tab_scanInjection);
this.mytab.Controls.Add(this.tab_injectLog);
@@ -2567,16 +2565,6 @@
this.label19.TabIndex = 5;
this.label19.Text = "将字符";
//
// tab_useDB
//
this.tab_useDB.Location = new System.Drawing.Point(4, 23);
this.tab_useDB.Name = "tab_useDB";
this.tab_useDB.Padding = new System.Windows.Forms.Padding(3);
this.tab_useDB.Size = new System.Drawing.Size(832, 451);
this.tab_useDB.TabIndex = 11;
this.tab_useDB.Text = "数据库利用";
this.tab_useDB.UseVisualStyleBackColor = true;
//
// tab_encoding
//
this.tab_encoding.Controls.Add(this.groupBox13);
@@ -3720,7 +3708,6 @@
private System.Windows.Forms.ToolStripMenuItem tsmi_injectLog_clearAllLog;
private System.Windows.Forms.ColumnHeader injectlog_col_ip;
private System.Windows.Forms.ColumnHeader injectlog_col_port;
private System.Windows.Forms.TabPage tab_useDB;
private System.Windows.Forms.Button cmd_btn_stop;
private System.Windows.Forms.Button file_btn_stop;
}

View File

@@ -115,7 +115,7 @@ namespace SuperSQLInjection
this.cbox_bypass_urlencode_count.SelectedIndex = 0;
this.cbox_base64Count.SelectedIndex = 0;
HTTP.main = this;
HTTP.initMain(this);
//清空日志
Thread t = new Thread(Tools.delHTTPLog);
t.Start();
@@ -230,7 +230,7 @@ namespace SuperSQLInjection
return sid;
}
public static int version = 20181221;
public static int version = 20181223;
public static string versionURL = "http://www.shack2.org/soft/getNewVersion?ENNAME=SSuperSQLInjection&NO=" + URLEncode.UrlEncode(getSid()) + "&VERSION=" + version;
//检查更新
public void checkUpdate()
@@ -5403,8 +5403,8 @@ namespace SuperSQLInjection
//自定义
if (!config.encoding.Equals(oserver.encoding))
{
DialogResult dr = MessageBox.Show("自动识别发现网页编码为“" + oserver.encoding + ",而你选择的编码是“" + config.encoding + "””,是否采用自定义编码,不选择将自动识别!", "提示信息", MessageBoxButtons.YesNo);
if (DialogResult.No.Equals(dr))
DialogResult dr = MessageBox.Show("自动识别发现网页编码为“" + oserver.encoding + ",而你选择的编码是“" + config.encoding + "””,是否采用自定义编码", "提示信息", MessageBoxButtons.YesNo);
if (DialogResult.Yes.Equals(dr))
{
this.cbox_basic_encoding.Text = HTTP.AutoGetEncoding;
}
@@ -5648,7 +5648,8 @@ namespace SuperSQLInjection
if (!config.dbType.ToString().Equals(pals[3])&& !config.dbType.Equals(DBType.UnKnow)) {
continue;
}
ServerInfo errorServer = HTTP.sendRequestRetry(config.useSSL, config.reTry, config.domain, config.port, pals[0], payload_request, config.timeOut, config.encoding, config.is_foward_302, config.redirectDoGet);
ServerInfo errorServer = HTTP.sendRequestRetry(config.useSSL, config.reTry, config.domain, config.port, HttpUtility.UrlDecode(pals[0]), payload_request, config.timeOut, config.encoding, config.is_foward_302, config.redirectDoGet);
if (errorServer.body.IndexOf(pals[1]) != -1)
{
@@ -8682,6 +8683,9 @@ namespace SuperSQLInjection
{
this.chk_useSSL.Checked = true;
}
else {
this.chk_useSSL.Checked = false;
}
Uri url = new Uri(config.request);
this.txt_inject_request.Text = Spider.reqestGetTemplate.Replace("{url}", url.PathAndQuery).Replace("{host}", url.Host + ":" + url.Port);
this.txt_basic_host.Text = url.Host;

View File

@@ -186,7 +186,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACq
DQAAAk1TRnQBSQFMAgEBBwEAASgBBwEoAQcBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
DQAAAk1TRnQBSQFMAgEBBwEAATgBBwE4AQcBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -291,7 +291,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAC
EwAAAk1TRnQBSQFMAgEBCgEAAagBBwGoAQcBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
EwAAAk1TRnQBSQFMAgEBCgEAAbgBBwG4AQcBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -412,6 +412,6 @@ Cache-Control: no-cache,no-store</value>
<value>973, 55</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>108</value>
<value>103</value>
</metadata>
</root>

View File

@@ -41,6 +41,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
@@ -50,6 +51,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
@@ -75,6 +77,7 @@
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
@@ -84,6 +87,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup />
<ItemGroup>
@@ -170,6 +174,7 @@
<Compile Include="tools\http\HttpTools.cs" />
<Compile Include="tools\http\model\HttpRequest.cs" />
<Compile Include="tools\http\model\HttpResponse.cs" />
<Compile Include="tools\http\SslProtocols.cs" />
<Compile Include="tools\http\TimeOutSocket.cs" />
<Compile Include="tools\InjectionTools.cs" />
<Compile Include="tools\LikeMath.cs" />
@@ -246,6 +251,7 @@
<EmbeddedResource Include="Waring.resx">
<DependentUpon>Waring.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

View File

@@ -13,6 +13,8 @@ using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
using SuperSQLInjection.bypass;
using SuperSQLInjection.tools.http;
using System.Net;
using SuperSQLInjection.model;
namespace SuperSQLInjection.tools
{
@@ -36,7 +38,7 @@ namespace SuperSQLInjection.tools
public static String getTemplate = "GET /mysql.jsp?id=1 HTTP/1.1\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240\r\nAccept-Encoding: gzip, deflate\r\nHost: 127.0.0.1:8090\r\nConnection: Close\r\nCookie: JSESSIONID=2F6D5F1AC8C376FF0AB48A08282A6CED";
public static String postTemplate = "POST /search/index.htm HTTP/1.1\r\nReferer: http://www.shack2.org/\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240\r\nContent-Type: application/x-www-form-urlencoded\r\nAccept-Encoding: gzip, deflate\r\nContent-Length: 5\r\nHost: www.shack2.org\r\nConnection: Keep-Alive\r\nPragma: no-cache\r\nCookie: CNZZDATA4159773=cnzz_eid%3D217492251-1446476958-%26ntime%3D1447834260; bdshare_firstime=1446476958863\r\n\r\nkey=s";
public void initMain(Main m)
public static void initMain(Main m)
{
main = m;
}
@@ -93,7 +95,8 @@ namespace SuperSQLInjection.tools
}
catch (Exception e)
{
Tools.SysLog("发包发生异常,正在重试----" + e.Message);
Tools.SysLog(e.Message);
main.Invoke(new Main.showLogDelegate(main.log),e.Message, LogLevel.waring);
server.timeout = true;
continue;
}
@@ -134,7 +137,8 @@ namespace SuperSQLInjection.tools
}
catch (Exception e)
{
Tools.SysLog("发包发生异常,正在重试----" + e.Message);
Tools.SysLog(e.Message);
main.Invoke(new Main.showLogDelegate(main.log), e.Message, LogLevel.waring);
server.timeout = true;
continue;
}
@@ -573,7 +577,8 @@ namespace SuperSQLInjection.tools
if (clientSocket.Connected)
{
ssl = new SslStream(clientSocket.GetStream(), false, new RemoteCertificateValidationCallback(ValidateServerCertificate));
SslProtocols protocol = SslProtocols.Ssl3 | SslProtocols.Ssl2 | SslProtocols.Tls;
//增加支持TLS1.1和TLS1.2支持3072768
SslProtocols protocol = (SslProtocols)3072|(SslProtocols)768|SslProtocols.Tls|SslProtocols.Ssl3;
ssl.AuthenticateAsClient(host, null, protocol, false);
if (ssl.IsAuthenticated)
{
@@ -588,7 +593,7 @@ namespace SuperSQLInjection.tools
}
}
server.request = request;
byte[] responseBody = new byte[1024 * 1024*10];
byte[] responseBody = new byte[1024 * 1024 * 10];
int len = 0;
//获取header头
String tmp = "";
@@ -616,7 +621,7 @@ namespace SuperSQLInjection.tools
server.header = sb.ToString().Replace(CTRL, "");
String[] headers = Regex.Split(server.header, CT);
//处理header
doHeader(ref server, ref headers,ref encoding);
doHeader(ref server, ref headers, ref encoding);
//302 301跳转
if ((server.code == 302 || server.code == 301) && foward_302)
{
@@ -641,7 +646,7 @@ namespace SuperSQLInjection.tools
rsb.Remove(0, 4);
rsb.Insert(0, "GET");
}
return sendHTTPSRequest(count, host, port, payload, rsb.ToString(), timeout, encoding, false, redirectDoGet);
}
@@ -782,13 +787,10 @@ namespace SuperSQLInjection.tools
}
}
}
catch (Exception e)
}catch (Exception e)
{
Exception ee = new Exception("HTTPS发包错误错误消息" + e.Message + "----发包编号:" + index);
if (ee.Message.IndexOf("doHeader") != -1) {
String a=e.Message;
}
throw ee;
}
finally