Search:

Type: Posts; User: raghu2383

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    9,616

    Yes, you are right, I figured it later on after...

    Yes, you are right, I figured it later on after much sweating. It cannot be accessed from an application and can be accessed through the kernel.

    thanks for the reply
  2. Replies
    2
    Views
    9,616

    Inline GCC Help with reading CR4 register

    Hi, this is an attempt to read the CR4 register into the A register (rax for 64 bit) on fedora 11 64 bit. The movq operation produces a segment fault.



    typedef unsigned long long UINT64;...
  3. gcc: Speify address for a function while compiling

    Hi,

    I am working on security topics, and I need to write a C file that has
    only one function in it (without the main routine). I need to compile
    it.
    Normally the compilation commands for it...
  4. Functions to get which process is utilizing a particular port

    Hi,

    I am trying to write C code to obtain which process is utilizing a particular port. I found that lsof does the same on the terminal. For example
    lsof -i :2000 tells which pid is using port...
  5. Thanks for replying, but I managed to fix the...

    Thanks for replying, but I managed to fix the problem. I was using 16 which was for sendmsg. It worked fine when I started using 9, which was for send
  6. send() system call using _asm and interrupt

    Hi,
    I wrote the following code for send() [of socket.h],


    char buffer[4];
    strcpy(buffer, "hi");
    __asm__("sub $16,%%esp\n"
    "movl %%ebx,(%%esp)\n"
    "movl ...
  7. Replies
    5
    Views
    3,771

    I resolved it, I was clobbering the parameters,...

    I resolved it, I was clobbering the parameters, the following code worked


    i = 35088;
    __asm__("movl $54,%%eax\n"
    "int $0x80\n"
    :"=a" (res)
    :"b" (s), "c" (i),...
  8. Replies
    5
    Views
    3,771

    Hey thanks for replying. I am using Ubuntu 8.04....

    Hey thanks for replying. I am using Ubuntu 8.04. And gcc 4.2.3
    I managed to write the socket() call in _asm, I am next trying to write the ioctl call in _asm. I wrote the following code for socket...
  9. Replies
    5
    Views
    3,771

    INT n instruction in C Program

    Hello,

    I am trying to read the IP address of a machine through a software interrupt.
    Is it possible to call the Software Interrupt (INT instruction) from a C program to do a specific task (in...
  10. Hey thanks for replying. I was actually worried...

    Hey thanks for replying. I was actually worried about a class of JMP instructions which are
    1) FF : JMP (near) absolute to address given in operand (16 or 32 bit)
    2) EA : JMP (far) absolute address...
  11. Do I use gcc -pie -fpie option?

    Do I use gcc -pie -fpie option?
  12. How do I do that? As in what gcc options do I...

    How do I do that? As in what gcc options do I give to ensure that it does not generate absolute jumps?
  13. As in I would Have to explain an entire topic of...

    As in I would Have to explain an entire topic of security research on this thread in order to explain that I am trying to do something legitimate. However I can give one argument which may or may not...
  14. Ok, its tough for me to explain that what I am...

    Ok, its tough for me to explain that what I am doing is legitimate. It is part of a long code that is meant to find if there are any issues in the system. The threat model I have in hand is forcing...
  15. Its part of a long code that is meant to prevent...

    Its part of a long code that is meant to prevent evil.
  16. Hey thanks for replying. What I am trying to do...

    Hey thanks for replying. What I am trying to do is Inject this code (well not this code but a different code without any function calls like printf) during run-time into a running process. The reason...
  17. Specify address for a function in Relocatable Code

    I compiled a program without the main routine in it.


    #include <stdio.h>
    void blank()
    {
    printf("\n Hello World");
    }
  18. I figured a small portion of the problem. p...

    I figured a small portion of the problem. p starts pointing to a different location after the alignment.
    so I did the following:



    #ifndef PAGESIZE
    #define PAGESIZE 4096
    #endif
    unsigned...
  19. Help with mprotect and writing on code section

    hi,
    I am trying to write on the code section of an executing C program. I tried using mprotect to get PROT_WRITE access to a section in memory and tried to write bytecode on it. It doesnt seem to...
Results 1 to 19 of 19