u/Ariadne_23

Does C23 officially allow type-punning through unions?

hellooo, here to ask about a low-level networking thing and i need to reinterpret a uint32_t as float without getting undefined behavior. the union type i use:

union {

uint32\_t u;

float f;

} pun = { .u = 0x3f800000 };

printf("%f\\n", pun.f);

this gives me undefined behavior in c99, c11, c17 because you read a different union member from you wrote. compilers like gcc and clang defined it anyway as an extension.

memcpy() is there, i know but this adds overhead (even though compilers optimizes it out usually). and yeah in kernel code or freestanding environments memcpy() is not always available.

what im looking for is:

has c23 any type-punning through unions for my case? when i googled it, i see discussions about n2530 and n2654 but there is no way to be sure if it made it into the final standart. maybe there is a better way to do this in portable c without relying on compiler extensions or memcpy. idk. even though seems to work on gcc 14, clang18, i want standart compliant, not just works on my machine.

reddit.com
u/Ariadne_23 — 3 days ago

Sesim yeterince maskülen mi? Ses maskülenleştirmekle ilgili önerileriniz neler?

https://voca.ro/13PP5OY2X18O

Ben pitch kaydedemedim ne kadar denediysem blackscreen verdi 😭 ondan mp3 convertleyip upload ettim. Sizce sesim yeterince maskülen mi? Nasıl daha kalın ve düşük tonda konuşabilirim? Teşekkürler.

reddit.com
u/Ariadne_23 — 4 days ago

PspCreateProcessNotifyRoutine pattern scanning + nulling triggers PatchGuard on 24h2 (works on win10/older builds). Any way to bypass without hooking PG verification routine?

guys i need help. i was just looking a bit edr evasion on my own lab machine (win 11 24h2), i need to remove process creation callbacks registered with PsSetCreateProcessNotifyRoutineEx without just disabling the driver.

i located the PspCreateProcessNotifyRoutine array in ntoskrnl (pattern scanning). here is a snippet of how i'm trying to null out the entires:

NTSTATUS remove_callback(PVOID driver_start, PVOID driver_end) {

    ULONG_PTR psp_array = find_pattern("48 8B 05 ? ? ? ? 48 85 C0 74 ? 4C 8B ...");

    if (!psp_array) return STATUS_NOT_FOUND;

    for (int i = 0; i < MAX_CALLBACKS; i++) {

        ULONG_PTR entry = psp_array + (i * sizeof(void*));

        PVOID callback = *(PVOID*)entry;

        if (callback >= driver_start && callback <= driver_end) {

            // null it out

            DWORD old;

            MmProtectDriverSection(entry, PAGE_READWRITE, &old);

            *(ULONG_PTR*)entry = 0;

            MmProtectDriverSection(entry, old, &old);

        }

    }

    return STATUS_SUCCESS;

}

actually its works fine win10 and older win11 builds. for some reason on 24h2 patchguard detects the modification in 5-10 minutes and triggers a bugcheck (0x109). i guess pg checks the integrity of PspCreateProcessNotifyRoutine periodically.

is there any chance to patch these callbacks on 24h2 without getting pg angry? i'm thinking about hooking the pg verification routine itself but that's a whole other rabbit hope. and any tips on finding PspCreateProcessNotifyRoutine on new builds without hardcoding offsets would be great. (tested on my own hardware, no production use)

reddit.com
u/Ariadne_23 — 5 days ago

Artık ben değil, 'anne' dediğim o bitch korkacak. why? Çünkü az önce kıçımı kurtaracak performansı sergilemeyi başardım. Evde ikimiz yalnızken babam harici kişilerle yediği bokları bildiğimi, telefonla konuşurken sesinin odama geldiğini ve dikkatli olmasını istediğimi söyledim. 5 ay önce androcur yakaladığında bana kurduğu "Baban bilse seni öldürür." cümlesini yüzüne söyleyebilmek o kadar iyi hissettirdi ki.

En güzel kısmı da tüm bu korkuyu verirken bir tehdit değil, güven kaynağı gibi gözükmem oldu. Babam 6 yıl önce onu aldattığı kadının telefonuna spyapp kurmuştu.

"Aynısını sana yapsa ne olurdu? Lütfen dikkatli ol anne. Önce seni sonra kendini vurur. Ben seni düşünüyorum."

Müthiş bir hismiş amk. Her sabah uyanınca "Acaba bugün babam beni vuracak mı" diye düşünen kişi artık o olacak. Belki sizin de cadaloz bir anneniz vardır. Hepsinin ümüğünü sıkmak lazım böyle. Şantaj yapmaya hep korkuyordum çünkü aramız bozulabilirdi ve kaos çıkma ihtimali vardı. Korktuğum şeyin olmamasını başardım.

reddit.com
u/Ariadne_23 — 7 days ago

Nereden biliyor ya? 7 ay HRT aldım, 5 ay önce yakalandım. Şu an bunu dediğine göre emin olmalı ama nasıl? Yerini bulmuş olamaz. Nasıl olduysa biliyor ve babama söylemedi. Belki de emin olmadığı için söylemedi veya babam beni öldürür, aile dağılır diye korktuğu için. Öyle ya da böyle devam mı etmeliyim yoksa gerçekten bırakmalı mıyım bilmiyorum. Babama söylerse gerçekten hayatım kararır. Bol bol fiziksel ve psikolojik şiddet uygular bana.

Belki devam edersem yine korkup söylemez. Kendi durumu da çok kötü. Babamdan sakladığı öyle şeyler var ki, zaten neredeyse boşanacaklar ve eğer babama anlatırsam %90 boşanırlar. Anneannem annemi orospu ilan etmiş durumda ve o bile nefret ediyor. Ben anneannemin 1 buçuk saat annem hakkında bana kin kusmasını dinledim. Anneannemin dedikleri doğruysa annemin kapısı hazır ve babamı aldatıyor. Bir insan kızının sonunun genelev, pavyonlarda masalarda meze olmak olacağını söyler mi? Anneannem söyledi. Babam annemin telefonuna casusluk yazılımı yükledi 2 gün önce (Annem bilmiyor).

Babam işteyken annem telefonunda arkadaşlarıyla gizlice sohbet ederken babam telefonunu dinlerse boşanabilirler ama HRT ile ilgili bir araştırma yaparsa da ben patlarım. Eğer annemi telefonundaki yazılımdan haberdar edersem güvenini kazanabilirim ama o güvenle HRT almama müsaade eder mi bilmiyorum. Ve boşanma ihtimalleri düşer. Boşanırlarsa fiziksel şiddet riski olmadan HRT alabilirim.

Annemle babam gerçekten boşanma eşiğindeler ve bunu tetiklemem mümkün ama hem çocuğunun trans olduğunu hem de karısının pek sadık olmadığını fark ederse sinirden hem bizim hem kendi kafasına sıkar mı bilmiyorum.

Siz olsanız ne yapardınız?

Edit: Anneme YKS'den sonra anneannemlerin yanına gidececeğimi söyledim. Hemen "beni bırakıyorsun yani. ben seni bırakmadım ama sen beni bırakıyorsun" dedi. Ses tonu bir anda hüzünle hayal kırıklığı arası bir şey oldu. 'hatırım için alma' derken ses tonu normal hatta hafif güler gibiydi. Beynim yanıyor ya ne yapmalıyım hiç bilmiyorum

reddit.com
u/Ariadne_23 — 10 days ago

hi everyone, i looked into a bit virtualized environments and something got my head. most people focus software bugs in the hypervisor, like memory corruption but why pci passthrough is not so popular?

let's say we pass a vulnerable device to the guest and manage to own that device's firmware or mmio space, then is it possible to leverage dma to break out to the host?

i'm reading some research about vfio and iommu bypass but practice is my weak point for now. i'm trying to see that if its possible to write a malicious driver inside the guest to spray dma transfer and overwrite host memory.

maybe i'm forcing myself to find alternatives and it might be stupid but i'd appreciate for any path or projects. thank you and appreciate it for every help.

reddit.com
u/Ariadne_23 — 12 days ago

I love her. Bedenim M iken bana 7 tane simsiyah XL t-shirt aldığı için onu seviyorum. Göğüsleri nasıl gizlerim, yazın ne yaparım diye kafa patlatırken sonunda annem yardım etti. Karnımda kelebekler uçuşuyor, paylaşmak istedim 🙂‍↕️💖🌷

reddit.com
u/Ariadne_23 — 14 days ago

hello, i'm trying to debug a binary that compiled with -fomit-frame-pointer. I tried to walk the stack manually inside a custom single handler but i can't rely on rbp chaining.

the function i'm looking at is this:

char buf[32];
gets(buf); // ignore, just for stack layout
}

compiled with gcc -fomit-frame-pointer -oo -o test test.c

the asm output:

test:
    sub rsp, 40
    mov [rsp+32], rdi
    mov [rsp+24], rsi
    lea rdi, [rsp+8]
    call gets
    add rsp, 40
    ret

i'm inside the signal handler and i get rsp from ucontext. i know that the return address at [rsp] (since call pushes rip). when go to the previous frame, i need to know how much add to rsp to get the caller's rsp. that was what i tried:

; assuming rsp points to the saved rip
mov rax, [rsp]      ; return address (caller rip)
; 

but how do i get caller rsp??? i tried looking at alignment but when the function does dynamic stack allocation (like alloca or variable-lenght arrays), it gets fucked. for example:

void test2(int n) {
    char buf[n];
    gets(buf);
}

and now the stack adjustment uses lea with a register. i see stuff like:

test2:
    push rbp
    sub rsp, 16
    lea rax, [rsp+15+rdi*1]
    and rax, -16
    ...

my brain is melting tbh and need help. is there a reliable way to compute the previous rsp without frame pointers? how do debuggers like gdb do it? do they just parse dwarf info?

pseudocode or even a small asm example would be very helpful. thanks for every info.

reddit.com
u/Ariadne_23 — 15 days ago

Merhaba, aile evinde gizlice HRT alma, month 7. Göğüslerimi bol hoodie giyerek zar zor gizleyebilsem de yaz geliyor ve kısa kollu giymeye zorlarlar yakında. Zargana olduğumdan kilo aldım vb. diyerek geçiştirmem çok zor. Sports bra, ince kısa kollu tshirt veya gömlek altında belli olur mu? Göğüs çıkıntısını gizleyebilmek için neler önerirsiniz? Şimdiden teşekkürler.

reddit.com
u/Ariadne_23 — 16 days ago