Results 1 to 9 of 9

Thread: Ollydbg => command line arguments Ax200

  1. #1
    totofino
    Guest

    Question Ollydbg => command line arguments Ax200

    hi,
    I would like to type this command "A"x200 (AAAAA....) in the command line arguments but its doesnt work ? i know in perl i can do that like that perl -e "print 'AAA'x200" . Can i do the same with ollydbg or there's a plugins command line make that ?

    Sincerely totofino
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  2. #2
    ...what exactly are you doing that requires that?

    I believe there is an F (fill) command...

  3. #3
    totofino
    Guest
    i need to exploit a buffer overflow on application so i need copy this string "A"x500 but i would like to do that in the command line arguments ollydbg ? lame.exe AAAAAAAAAAAAAAAAAAAA (Ax500x)Do u know the commmand to do it automaticaly ? do u know my answer ?
    Last edited by totofino; November 21st, 2006 at 11:39.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  4. #4
    Super Moderator
    Join Date
    Dec 2004
    Posts
    1,526
    Blog Entries
    15
    if you are willing to fill in the argument manually
    you can use debug -> arguments type in aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    500 times and restart the application

    next time it runs ollydbg will do it with arguments

    or go to start --> run --> cmd --> cd \ then in c:\ > type "path to ollydbg dir\ollydbg.exe "path to application directory\app.exe aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

    ollydbg will start the applicaton with arguments

    Code:
    D:\>d:\odbg110\OLLYDBG.EXE d:\Borland\BCC55\Bin\kdtest\kdtest.exe aaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    
    Log data
    Address    Message
               OllyDbg v1.10
               Command line: d:\Borland\BCC55\Bin\kdtest\kdtest.exe aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
               
               Console file 'd:\Borland\BCC55\Bin\kdtest\kdtest.exe'
               Arguments 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
               00401000   Program entry point
    
    EAX 00000066
    ECX 0012FA14 ASCII "aaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    EDX 7C90EB94 ntdll.KiFastSystemCallRet
    EBX 7FFDF000
    ESP 0012FF94 ASCII "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    EBP 61616161
    ESI 0040A0B8 kdtest.0040A0B8
    EDI 00000000
    EIP 61616161  <-------------------- pwned :)
    Last edited by blabberer; November 21st, 2006 at 12:06.

  5. #5
    totofino
    Guest
    but thanks blabberer but i d wouldnt type 500x the string A i would like to do automicaly you know ??,
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  6. #6
    Super Moderator
    Join Date
    Dec 2004
    Posts
    1,526
    Blog Entries
    15
    ollydbg != gdb
    windows != linux

    windows debuggers would normally not work with stdin redirections
    like it works in linux

    ollydbg will not take < operator as an argument at all and will not pass the input from file to the exe as argument
    neither would windbg for that case unless you play with cmd /k blah foo crap
    bs

    so only way you could do that in windows debugger is to do it manually

    if you have nix access use putty and access linux with echo -n e whatever and copy paste the string to ollydbg thats the closest you can get to automate typing string

    there is an activeperl available for windows see if it could provide you some relief if active perl does what you want to do in simple examples
    try looking for joe stewerts olly perl (beware it is buggy with overflows to boot and possibly completely discontinued by the authour as it was almost poc from start)

    by the way if you had googled you could have noticed almost all buffer overflow tutorials are nix based and all examples sayin
    cat foo | more | less < blah > foo | grep < perl > python | stdin you would notice there are almost few or almost nil examples for windows

    also windows compilers are by default more stricter in stack usage
    (that in no way means its ultimate but if you want to play with some examples find andrewgs pulltheplug vortex level 1 and try compiling it with bcc you will see the vector has completely been eliminated even in primitive bcc 5.5 compilers you simply cannot solve that level 1 compiled with bcc coz bcc simply doesnt use stack at all )

  7. #7
    totofino
    Guest
    i do that now it funny it easy loll C:\Documents and Settings\bitch>perl -e "print 'A'x500" >> c:\string.txt
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  8. #8
    Naides is Nobody
    Join Date
    Jan 2002
    Location
    Planet Earth
    Posts
    1,647
    Why don't you copy the 500 'A' from string.txt and paste the string into the Olly command line buffer?

  9. #9
    Quote Originally Posted by totofino View Post
    i need to exploit a buffer overflow on application so i need copy this string "A"x500 but i would like to do that in the command line arguments ollydbg ? lame.exe AAAAAAAAAAAAAAAAAAAA (Ax500x)Do u know the commmand to do it automaticaly ? do u know my answer ?
    Why are you asking nearly the exact same thing when I already told you?

Similar Threads

  1. passing command line arguments via IDA while debugging
    By blahh in forum The Newbie Forum
    Replies: 6
    Last Post: June 29th, 2011, 01:41
  2. Running scripts from the command line with idascript
    By Hex Blog in forum Blogs Forum
    Replies: 0
    Last Post: July 9th, 2010, 22:43
  3. FSG unpacker with command line support?
    By going in forum Malware Analysis and Unpacking Forum
    Replies: 2
    Last Post: January 7th, 2010, 23:00
  4. ollydbg command line parameter??
    By pillii in forum OllyDbg Support Forums
    Replies: 9
    Last Post: October 7th, 2005, 04:32
  5. Opening an installer with command line
    By andresiraola in forum OllyDbg Support Forums
    Replies: 2
    Last Post: February 9th, 2005, 08:07

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •