Skip to content

Instantly share code, notes, and snippets.

View Ruturaj4's full-sized avatar
:bowtie:
Working

Ruturaj Vaidya Ruturaj4

:bowtie:
Working
View GitHub Profile
@icecr4ck
icecr4ck / ida_mc_notes.md
Last active May 3, 2024 09:25
Some notes about the IDA Microcode (intermediate language).
@gdbinit
gdbinit / gist:3c2022907af5ca476173985492d6ec6e
Created January 23, 2018 19:16
Retrieve IDA stack variables cross references from IDA C SDK
/* retrieve the current function information - we need this to extract the stack frame */
func_t *current_function = get_func(current_addr);
/* retrieve the stack frame for this function - IDA encapsulates it as struc_t */
struc_t *frame = get_frame(current_function);
/* now each variable is a member of the structure - Chris Eagle book shows how to iterate over this */
for (int i = 0; i < frame->memqty; i++)
{
/* so each variable is a member - we can retrieve its netnode id via the .id field - in case of structures/stack variables
* this is an address starting by 0xFF but it's still a netnode like everything else in IDA
*/