Anonymous
I see thanks. so basically . if I adds __asm{jmp esp} , it will generate jmp esp gadgets for the binary itself right
no, it is implementation defined and in most cases will be ignored by compiler due to no usage
Mar!o
I see thanks. so basically . if I adds __asm{jmp esp} , it will generate jmp esp gadgets for the binary itself right
If it is not called the compiler will remove it also add volatile like asm volatile to prevent it from moving
Mar!o
Inline asm is almost never needed for sse/avx there are intrinsics
Mar!o
The only time I needed it when I wrote a mini kernel and a vm in c to sqeeze out the last bit of speed 😝
professor
I see .
Mar!o
So what do you want to archieve with your inline asm?
professor
So what do you want to archieve with your inline asm?
adding gadgets . look the original article
Mar!o
And by the way what do you all here think about Rust? I think about to rewrite my C stuff in Rust but does it really matter? C is still nr.2 of most used programming languanes after java
Anonymous
adding gadgets . look the original article
it is not a wise gadget. AFAIK stack is never executable
Anonymous
How,?
you should study about paging and access violation first
professor
In this case asm in-line adds right?
Anonymous
In this case asm in-line adds right?
in this case compiler will ignore your help() function; because it is never referenced by anything else; also you may not execute any instruction in stack, because stack is not executable
Mar!o
I dont really get the point of these Gadgets??
Anonymous
professor
in order to control flow
Mar!o
Thx*
Mar!o
Mar!o
Whats your favourite ASM instruction?
Mar!o
Mine is NOP because it literally does nothing and still needs time to execute 😂
Anonymous
I Have a question what does mean inline asm here void help() { asm("jmp rsp"); } int main(int argc, char **argv) { char buffer[16]; fgets(buffer, 200, stdin); return 0; }
I guess it is more functional: struct mydata { char buf[16]; int (*strlen)(const char *); }; int main(int argc, char **argv) { struct mydata data; data.strlen = strlen; fgets(data.buf, 200, stdin); int len = data.strlen(data.buf); return 0; }
Anonymous
Whats your favourite ASM instruction?
i'm in love with SIMD instructions 😍
Anonymous
where does this store jmp esp?
i missed a part. edited the message
Mar!o
i'm in love with SIMD instructions 😍
Yes they are nice especially AVX512 but in asm they are okay but the c intrinsics are all really ugly 🤢
Mar!o
Anonymous
Still no asm called??
yes. when you are planning a vulnerability it is best to never use asm directly
professor
I see thanks
Prosvetlennii Dimas
How to generate one header file from many files, using gcc -E but save defines?
Mar!o
😄
Mar!o
Thats the only use of python small ugly tools (sry Im not a big fan)
Prosvetlennii Dimas
i have preprocessor comands like ifdef
Prosvetlennii Dimas
it seems i could use gcc -E but its removes macros
Mar!o
Finally god arrived, rise up Terry Davis!
Mar!o
Mar!o
Sry guys I'm fucking tired and should sleep...
Mar!o
What have I done
Mar!o
Now 10k people hate me ☹️
Dima
wtf
Mar!o
wtf
I don't understand that Jesus has long hair
Anonymous
Hello guys
Anonymous
I didn't quite understand what mmap does, who would explain me that?
Mar!o
Sry need to sleep now
Anonymous
😔
Anonymous
Ty anyway
Anonymous
I didn't quite understand what mmap does, who would explain me that?
it is an advanced form of malloc/calloc. it is used to allocate shared memory, file mapped memory, and read/write/execute protected memory. for example you might want to extract a binary executable file on the fly and execute that. you may not execute a memory allocated by calloc, but you might execute memory allocated by mmap
Levi
Chirag Garg: Given two arrays A and B. Shuffle array A such that sum of A[i]xorB[i] for all i [1,N] is minimised ex: A = [1,2] , B=[2,3] output: 2
TiMis
Any one with car rental system project
MilkBeforeCereal
Any one with car rental system project
tell them how much $$$ you're giving first
TiMis
Hmm
TiMis
I need it in visual basic
Igor🇺🇦
Any one with car rental system project
These guys have https://answers.sap.com/questions/7577559/management-of-car-rental-on-sap.html
Anonymous
What is "mapped memory"? Sorry for the questions
it is possible to map a proportion of process's virtual memory to a file. process see as the entire file is loaded into memory; but it is not, and operating system swaps memory pages in background
Anonymous
Oh I think I understood it
Anonymous
Ty
Anonymous
Hi folks, which IDE would you guys recommend for c++?
Anonymous
What OS?
mostly windows sometimes linux
Anonymous
Nameful
Hmm Clion then
Emacs is fine too if he has a strong pinky
Anonymous
Emacs is fine too if he has a strong pinky
Yeah, but Emacs under Windows is sometimes a bit pain.. In my experience. But I dont have much windows experience.
Anonymous
You can give it a try if you want. I use cmake-ide, irony-mode and rtags mostly, it's a great and powerful "IDE" with it.
Igor🇺🇦
Hi folks, which IDE would you guys recommend for c++?
For Windows it's Visual Studio, Clion
Igor🇺🇦
Hi folks, which IDE would you guys recommend for c++?
Eclipse is good too if you want something free and working on many different platforms
Anonymous
last time I used eclipse for cxx it was pretty limited and sometimes a nightmare
Anonymous
Probably because eclipse itself is a nightmare
Anonymous
For Windows it's Visual Studio, Clion
I had problem about .h files but same code worked on eclipse
Igor🇺🇦
last time I used eclipse for cxx it was pretty limited and sometimes a nightmare
I work at a company with hundreds of developers and most of them use Eclipse. Don't know what issues you had 🤷‍♂️
Raj
Hi
Nameful
What do you guys think of Code::Blocks for C/C++ development?