6060#include < utility>
6161#include < stdexcept>
6262#include < ws2tcpip.h>
63- #include < winhttp.h>
6463#include < windns.h>
6564#include < tlhelp32.h>
6665#include < string>
@@ -250,7 +249,6 @@ std::vector<std::pair<std::uintptr_t, DWORD>> data_protections;
250249std::atomic<int > heavy_fail_streak{ 0 };
251250static const char * kCriticalImports [] = {
252251 " WinVerifyTrust" ,
253- " WinHttpGetDefaultProxyConfiguration" ,
254252 " WinHttpSendRequest" ,
255253 " WinHttpReceiveResponse" ,
256254 " CryptVerifyMessageSignature" ,
@@ -402,7 +400,6 @@ static bool list_contains_any(const std::string& hay, const std::vector<std::str
402400static bool suspicious_processes_present ()
403401{
404402 const std::vector<std::string> bad = {
405- " fiddler" , " mitmproxy" , " charles" , " httpdebugger" , " proxifier" ,
406403 " burpsuite" , " wireshark" , " tshark" , " x64dbg" , " x32dbg" ,
407404 " ollydbg" , " ida" , " cheatengine" , " processhacker"
408405 };
@@ -451,7 +448,6 @@ static bool suspicious_modules_present()
451448static bool suspicious_windows_present ()
452449{
453450 const std::vector<std::string> bad = {
454- " fiddler" , " mitmproxy" , " charles" , " burp" , " http debugger" ,
455451 " x64dbg" , " x32dbg" , " ollydbg" , " ida" , " cheat engine" ,
456452 " process hacker"
457453 };
@@ -2594,37 +2590,6 @@ static bool is_https_url(const std::string& url)
25942590 return true ;
25952591}
25962592
2597- static bool winhttp_proxy_set ()
2598- {
2599- WINHTTP_PROXY_INFO info{};
2600- if (!WinHttpGetDefaultProxyConfiguration (&info))
2601- return false ;
2602- bool set = false ;
2603- if (info.lpszProxy && *info.lpszProxy )
2604- set = true ;
2605- if (info.lpszProxyBypass && *info.lpszProxyBypass )
2606- set = true ;
2607- if (info.lpszProxy ) GlobalFree (info.lpszProxy );
2608- if (info.lpszProxyBypass ) GlobalFree (info.lpszProxyBypass );
2609- return set;
2610- }
2611-
2612- static bool winhttp_proxy_auto_set ()
2613- {
2614- WINHTTP_CURRENT_USER_IE_PROXY_CONFIG cfg{};
2615- if (!WinHttpGetIEProxyConfigForCurrentUser (&cfg))
2616- return false ;
2617- bool set = false ;
2618- if (cfg.fAutoDetect )
2619- set = true ;
2620- if (cfg.lpszAutoConfigUrl && *cfg.lpszAutoConfigUrl )
2621- set = true ;
2622- if (cfg.lpszAutoConfigUrl ) GlobalFree (cfg.lpszAutoConfigUrl );
2623- if (cfg.lpszProxy ) GlobalFree (cfg.lpszProxy );
2624- if (cfg.lpszProxyBypass ) GlobalFree (cfg.lpszProxyBypass );
2625- return set;
2626- }
2627-
26282593static bool host_resolves_private_only (const std::string& host, bool & has_public)
26292594{
26302595 has_public = false ;
@@ -4404,13 +4369,11 @@ void checkInit() {
44044369
44054370 if (export_mismatch (" KERNEL32.dll" , " LoadLibraryA" ) ||
44064371 export_mismatch (" KERNEL32.dll" , " GetProcAddress" ) ||
4407- export_mismatch (" WINHTTP.dll" , " WinHttpGetDefaultProxyConfiguration" ) ||
44084372 export_mismatch (" WINTRUST.dll" , " WinVerifyTrust" )) {
44094373 error (XorStr (" export mismatch detected." ));
44104374 }
44114375
4412- if (hotpatch_prologue_present (&WinVerifyTrust) ||
4413- hotpatch_prologue_present (&WinHttpGetDefaultProxyConfiguration)) {
4376+ if (hotpatch_prologue_present (&WinVerifyTrust)) {
44144377 error (XorStr (" hotpatch prologue detected." ));
44154378 }
44164379
@@ -4428,7 +4391,6 @@ void checkInit() {
44284391
44294392 if (iat_hook_suspect (" KERNEL32.dll" , " LoadLibraryA" ) ||
44304393 iat_hook_suspect (" KERNEL32.dll" , " GetProcAddress" ) ||
4431- iat_hook_suspect (" WINHTTP.dll" , " WinHttpGetDefaultProxyConfiguration" ) ||
44324394 iat_hook_suspect (" WINTRUST.dll" , " WinVerifyTrust" )) {
44334395 error (XorStr (" iat hook detected." ));
44344396 }
0 commit comments