This is a bit from shellforge, don't know if this is what you want, or is even on the right track. It for a write command = char buf[20], write(1,buf,20);
What i understand from asm if you find a part of the program or function label, replace it with the asm below and then add the goto label of the function you replaced at the end of this, it will print the stuff to the screen and then go onto the normal flow.
Up date the thread if you find any infomation , i'm looking into this as well, cheers
#define _sfsyscall3(type,name,type1,arg1,type2,arg2,type3, arg3) \
type name(type1 arg1,type2 arg2,type3 arg3) \
{ \
long __res; \
__asm__ volatile ("pushl %%ebx\n\t" \
"mov %2,%%ebx\n\t" \
"int $0x80\n\t" \
"popl %%ebx" \
: "=a" (__res) \
: "0" (__NR_##name),"g" ((long)(arg1)),"c" ((long)(arg2)), \
"d" ((long)(arg3)) ); \
__sfsyscall_return(type,__res); \
}
static inline _sfsyscall3( ssize_t, write, int, fd, const void *, buf, size_t, count )



