Account

Posts of #Arm1tage

newest first

#688Photo

Интеграция ИИ в Nuclei В последнем обновлении для нуклей (3.3.9) был добавлен флаг -ai, который позволяет на ходу генерировать темплейт на основе ваших запросов. Для начала пользования этой фичей нужно получить АПИ токен на сайте ProjectDiscovery. Затем запускаем нуклей с флагом auth: nuclei -auth И добавляем токен. Теперь мы можем пользоваться генератором темплейтов. Запуск выглядит следующим образом: nuclei -u "http://testphp.vulnweb.com/listproducts.php?cat=1" -ai "Detect SQL errors in response when injecting common payloads into GET and POST requests" -dast Таким образом нуклей сгенерирует темплейт для инъекции SQL в параметры с дальнейшим поиском SQL ошибок, флаг -dast разрешает сканнеру проводить тестирование параметров. Уважаемый Дмитрий АКА @reewardius создал свой сборник уже готовых промптов для разных типов ошибок и уязвимостей. Некоторые из них уже были успешно использованы в качестве теста. Вот несколько из них для примера: -ai "Perform fuzzing on all parameters and HTTP methods using DSL, focusing on detecting XSS vulnerabilities (Reflected, Stored, and DOM-based) with pre-conditions." -ai "Detect exposed .git repositories and sensitive files" -ai "Identify default credentials on login pages" -ai "Identify open FTP servers allowing anonymous access" В общем ждем, когда ИИ будет топ 1 на хакерване. #nuclei #ai

Open in Telegram
Views9,711
Forwards325
Reactions19
Comments—
#687Photo
Views2,310
Forwards23
Reactions12
Comments—
#685Photoalbumedited

Спреим учетки под O365 В ходе Red Team-кампании учетные записи сотрудников играют ключевую роль в получении доступа внутрь. Чаще всего задействуются аккаунты Google и O365. Поговорим про O365. Для начала надо собрать почты сотрудников. Существуют разные сервисы: - Платные: phonebook, dehashed, snusbase, leakcheck, leakpeek; - Бесплатные но с ограниченным функционалом, вроде hunter[.]io, rocketreach[.]co или искать по гугл доркам (напр. "@tesla[.]com"). Так же полезным методом сбора учеток будет использование линкедина и утилиты CrossLinked с возможностью задавать формат почты. Пример использования: crosslinked -f '{f}{last}@tesla.com' Tesla После сбора учеток используем o365spray чтобы убедиться, что найденная почта действительно существует и попытаться сбрутить пароль. Пример использования: o365spray --validate --domain test.com o365spray --enum -U usernames.txt --domain test.com o365spray --spray -U usernames.txt -P passwords.txt --count 2 --lockout 5 --domain test.com #email #spray

Open in Telegram
Views2,479
Forwards57
Reactions15
Comments—
#680Textedited

Web cache deception Слёту надо понять разницу между Cache Poisoning и Cache Deception: Cache Poisoning: Атакующий делает инъекцию в контент, который затем кэшируется для всех пользователей сервиса. Cache Deception: Атакующий делает инъекцию в контент, который при посещении жертвой кэшируется на сервисе и к нему может получить доступ только атакующий. Понятнее: У Серёги есть запрос, который возвращает ему его АПИ ключ. Серёга шаманит и изменяет ссылку на получение АПИ ключа так, чтобы сервер его закэшировал. Серёга даёт эту ссылку Алисе, та открывает и ГГ. Серёга снова открывает ссылку, над которой он шаманил и теперь он видит АПИ ключ Алисы, т.к. сервер закэшировал запрос Алисы. Для этой лабы рекомендуется использовать сканнер бурпа, ибо он имеет все нужные проверки на этот тип уязвимости. 🤨1. Exploiting path mapping for web cache deception - Log into your account. - In Burp Suite check /my-account request. - Modify the request to look like this: /my-account/cache.css - Send the request and observe X-Cache: miss - Go to exploit server. Create the next payload: <script> location="https://portswigger.com/my-account/cache1.css"; </script> - Send the exploit. Go to repeater and send the request with the same path (/my-account/cache1.css). Observe carlos' API is cached. 🤨2. Exploiting path delimiters for web cache deception There are two ways to do this lab: 2.1 Use Portswigger's delimiters list: - Send the /my-account request to Intruder. - Change the request to match .css file, like this: /my-account§§cache.css - Paste the delimiters list into intruder and start an attack. - Note, that the only request with 200 status code is /my-account;cache.css 2.2 Scan the /my-account request with Burp Suite. - Burp Suite scanner will discover, that the delimiter is ; - Go to exploit server. Create the next payload: <script> location="https://portswigger.com/my-account;cache1.css"; </script> - Send the exploit. Go to repeater and send the request with the same path (/my-account;cache1.css). Observe carlos' API is cached. 🤨3. Exploiting origin server normalization for web cache deception - Check the resources, that are cached by the server (for example everything after /resources/... is cached). You can check if the server caches by X-Cache: miss header. - Create the next path: /resources/..%2fmy-account?cache=1234 This will get you 200 OK and server will cache it (because of /resources/...) - Go to exploit server. Create the next payload: <script> location="https://portswigger.com/resources/..%2fmy-account?cache=1234"; </script> - Send the exploit. Go to repeater and send the request with the same path (/resources/..%2fmy-account?cache=1234). Observe carlos' API is cached. 🤨4. Exploiting cache server normalization for web cache deception - Check the resources, that are cached by the server (for example everything after /resources/... is cached). You can check if the server caches by X-Cache: miss header. - We are dealing with cache server instead of origin, so now we need to replace resources and my-account. - Create the next path: /my-account%2f%2e%2e%2fresources?cache=1234 - It will give you 404. Now you need to find a delimiter. You can brute it using intruder. The delimiter is #. - Create the next path: /my-account#%2f%2e%2e%2fresources?cache=1234 This will get you 200 OK and server will cache it. - Go to exploit server. Create the next payload (do not forget to url-encode #): <script> location="https://portswigger.com/my-account%23%2f%2e%2e%2fresources?cache=1234"; </script> - Send the exploit. Go to repeater and send the request with the same path (/my-account%23%2f%2e%2e%2fresources?cache=1234). Observe carlos' API is cached. #portswigger #cache

Open in Telegram
Views2,752
Forwards32
Reactions13
Comments—
#677Text

Forwarded from road to OSCP

Today, we'll talk a bit about JavaScript recon in web applications. I've based my methodology on My Javascript Recon Process - BugBounty. Collecting links to JS files can be done using gau: gau example.com | grep -iE '\.js' | grep -ivE '\.json' | sort -u >> exampleJS.txt Alternatively, you can use waymore, which seems to be better: python3 waymore.py -i example.com -ko "\.js(\?|$)" We can also try fuzzing to find hidden JS files: ffuf -u https://www.example.com/js/ -w jsWordlist.txt -t 200 The wordlist for fuzzing can be found here: https://wordlists.assetnote.io/ After that, ping the JS links as some of them may be outdated. httpx -l exampleJS.txt -mc 200 Now, let's look for secrets in these files using SecretFinder, a tool for detecting sensitive data such as apikeys, accesstokens, authorizations, jwt, etc. in a JS file: cat exampleJS.txt | xargs -n2 -I @ bash -c 'echo -e "\n[URL] @\n";python3 SecretFinder.py -i @ -o cli' >> exampleJsSecrets.txt Next, using availableForPurchase.py, we can check if the domains referenced in the JS files are available for purchase. This tool, combined with linkfinder and collector, is really powerful. Sometimes developers make mistakes when writing a domain, possibly the domain imports an external JavaScript file, etc. cat exampleJS.txt | xargs -I @ bash -c 'python3 linkfinder.py -i @ -o cli' | python3 collector.py output cat output/urls.txt | python3 availableForPurchase.py [NO] www.googleapis.com [YES] www.gooogleapis.com After executing the above command, a list of potential endpoints that were discovered in the JS becomes available for review: cat output/paths.txt We can also immediately check for subdomain takeover using subzy cat output/urls.txt |grep "https\{0,1\}://[^/]*\.example\.com/[^ ]*" >> subdomainExample.txt; subzy run --targets subdomainExample.txt Also, excellent extensions for Burp: JS Miner and JS Link Finder which perform similar tasks but in real-time, for greater coverage it's better to use both script scanning and plugins

Open in Telegram
Views2,722
Forwards62
Reactions18
Comments—
#676Text

Forwarded from another channel

[ XZ backdoor - CVE-2024-3094 ] ! Backdoor in upstream xz/liblzma leading to SSH server compromise ! Check: xz --version 5.6.0 & 5.6.1 — v u l n e r a b l e Update: sudo apt update && sudo apt install --only-upgrade liblzma5 Summary: https://boehs.org/node/everything-i-know-about-the-xz-backdoor How it all started (email): https://www.openwall.com/lists/oss-security/2024/03/29/4 GitHub Thread: https://web.archive.org/web/20240329223553/https://github.com/tukaani-project/xz/issues/92 Message from Kali Linux team: https://twitter.com/kalilinux/status/1773786266074513523 The xz package, starting from version 5.6.0 to 5.6.1, was found to contain a backdoor. The impact of this vulnerability affected Kali between March 26th to March 29th. If you updated your Kali installation on or after March 26th, it is crucial to apply the latest updates today. Note that (almost) all Linux distros could be affected! For example, Fedora — Red Hat warned users to immediately stop using systems running Fedora development and experimental versions: https://www.bleepingcomputer.com/news/security/red-hat-warns-of-backdoor-in-xz-tools-used-by-most-linux-distros News: https://www.helpnetsecurity.com/2024/03/29/cve-2024-3094-linux-backdoor And from CISA: https://www.cisa.gov/news-events/alerts/2024/03/29/reported-supply-chain-compromise-affecting-xz-utils-data-compression-library-cve-2024-3094 So... JiaT75 made 750 commits in 2 years and finally backdoored XZ...

Open in Telegram
Views1,961
Forwards15
Reactions12
Comments—
#674Photo

Email Spoofing Тема не нова, но часто забываемая при пентесте веб-апликаций. Email Spoofing - атака на домены, которые не используют или используют криво настроенные SPF и DMARC записи, которая позволяет отправлять письма от лица этого самого домена. Используется при фишинге и спаме, т.к. у человека, который увидел знакомый домен больше доверия к письму. Два сервиса, которые позволяют проверить DMARC и SPF записи: https://dmarcian.com/dmarc-inspector/# https://dmarcian.com/spf-survey/ https://mxtoolbox.com/ Важно добавить, что даже если сервис имеет DMARC и SPF записи, они могут быть настроены со следующими флагами: p=quarantine или p=none для DMARC - означает, что письма будут попадать только в спам ~all для SPF - означает, что письма будут приняты но будут помечены как подозрительное Короче: ты сможешь отправить письмо от лица домена, но оно попадёт в спам. Чем можно отправить письмо в случае уязвимого домена? Два сервиса: Emkei и DMARC-Tester. Чем можно проверить несколько доменов сразу на наличие уязвимости? Ранее упомянутый Spoofy. ./spoofy.py -d bugcrowd.com -o spoof.txt Как защититься? Установи атрибут p=reject для DMARC и -all (тот же тэг all только знак не ~ а -) для SPF. Это запретит отправку из неизвестных источников. #emailspoofing

Open in Telegram
Views2,260
Forwards63
Reactions18
Comments—
#672Photoedited
Views1,851
Forwards2
Reactions27
Comments—
#668Photo
Views1,993
Forwards33
Reactions11
Comments—
#666Photoedited

Git утечки Раз уж на то пошло, соберу здесь все инструменты, которыми пользуюсь для поиска утечек и других полезных вещей в гит репозиториях. GitDorker - использует список дорков гита для поиска утечек, токенов, ключей и тп по ключевому слову. python3 GitDorker.py -tf TOKENSFILE -q tesla.com -d Dorks/DORKFILE -o tesla github-dorks - тоже самое, только тут поиск происходит по репозиторию а не по ключевому слову. github-dork.py -r techgaun/github-dorks git-dumper - если вы нашли на тестируемом сайте .git папку, с помощью этого вы можете сдампить все файлы, которые принадлежат этой папке. ./git_dumper.py http://website.com/.git ~/website trufflehog - об этом все знают, но не включит не мог. Поиск секретов по репозиториям git или github. trufflehog git https://github.com/trufflesecurity/trufflehog.git trufflehog github --repo=https://github.com/trufflesecurity/test_keys Важно добавить, что у гитхаба есть рейт-лимит, который ограничивает скорость до 30 запросов в минуту. Потому для полного сканирования потребуется некоторое время. #git #tool

Open in Telegram
Views1,899
Forwards77
Reactions11
Comments—
#663Photoedited

Полезное Пересматривал свои заметки и решил скомпилировать в один пост разные, не имеющие между собой ничего общего инструменты. Раньше такого не практиковал и вряд-ли часто буду, но пока, чтобы не мозолить глаза разными ссылками в заметках, сохраню их тут. subzy - поиск subdomain takeover, задаешь список доменов и пошел. ./subzy run —targets domains.txt spoofy - проверяет домены на спуфинг SPF / DMARC записей. ./spoofy.py -d bugcrowd.com -o spoof.txt ParamSpider - поиск параметров в гет-запросах для (суб)доменов с помощью веб-архива. python3 paramspider.py --domain bugcrowd.com --exclude woff,css,js,png,svg,php,jpg --output bugcrowd.txt NucleiFuzzer - нашел с помощью ParamSpider параметры и сразу проверил их в нуклее. nf -d bugcrowd.com cdncheck - проверить какие технологии используются на определенном домене. cat domains.txt | cdncheck -resp wappalyzergo - тоже что и cdncheck. Спасибо @szybnev. hackBrowserData - экспорт данных из браузера (пароли, история, куки и тп). SSRFmap - автоматизация SSRF атак. Только в образовательных целях. #tool

Open in Telegram
Views3,580
Forwards117
Reactions14
Comments—