Results 1 to 15 of 15
  1. #1
    dakr54's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    396
    Reputation
    16
    Thanks
    669

    How to make byte patterns

    Okay many of you may not know how to do this or are just using patterns without knowing how to find them or update them yourself, so I will teach you the process of making a byte pattern.

    CharacterHiddenRunAlpha

    Okay the first thing you wanna do is load up your debugger and cshell and then navigate to the above string and find the offset.
    Code:
    0x90
    Great, now how do we make a pattern for it? Simple, we look at the bytes and figure out what changes and make a pattern that can be searched for based off of that!

    Now, Look at the bytes next to the disassembly, it reads
    Code:
    10192FEB      |       D99C11 90000000   |    FSTP DWORD PTR DS:[ECX+EDX+90]
    The bytes that pertain to this line are 0xD9 0x9C 0x11 0x90 0x00 0x00 0x00 0x00. Hit CTRL + B and type this in

    Code:
    D9 9C 11 90
    then search. You will land exactly at the address containing the offset, but what is the guarantee that the bytes will always be the same? we don't know exactly, and that's why pattern scanning can be a good thing. let me just lay down a few things here, anytime we see a byte that is likely to change we replace it with a ?? (i'm not using any code so i'm just showing you the binary string scans in ollydbg), also 0x00 is a wildcard also but a trailing null byte and won't be needed for a pattern scan. Everything else is okay to put in your pattern.

    Okay, lets start off with the simplest assumption, that only 0x90 will change, so we change the 0x90 to ?? (dont include the ?? since it's trailing)
    Code:
     D9 9C 11
    What happens when you search this? You actually don't land on the exact address, which can be a problem. Most of the time you cant make a unique pattern from that single line, you have to do some tinkering. What should have happened is that you should have landed on the address with the offset for MaxCanDefuseDistance, since many offsets will share similar byte patterns, you must expand on your byte pattern.

    MaxCanDefuseDistance looks like this
    Code:
     D9 9C 11 84
    So what you need to do is take some bytes from both strings and compare them to see where they differ, and that is where you can make a unique pattern. From MaxCanDefuseDistance I took this:
    Code:
    D9 9C 11 84 00 00 00 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 08 E1 3E 10 50 E8 1F 71 1E 00 83 C4 08 3B C3
    While for CharacterHiddenRunAlpha I took this:
    Code:
    D9 9C 11 90 00 00 00 8B 4C 24 30 3B CB 74 0D 8B44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C24 30 8B 04 B9 68 C0 E0 3E 10 50 E8 F5 6F 1E 00 83 C4 08 3B C3
    You then had to find out where they differ and here, I did it for you

    MaxCanDefuseDistance
    Code:
    D9 9C 11 84 00 00 00 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 08 E1 3E 10 50 E8 1F 71 1E 00 83 C4 08 3B C3
    CharacterHiddenRunAlpha
    Code:
    D9 9C 11 90 00 00 00 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 C0 E0 3E 10 50 E8 F5 6F 1E 00 83 C4 08 3B C3
    Obviously 0x84 and 0x94 are both offsets that you want to edit, so make them wildcards. Also, make all the 0x00's wild cards.

    MaxCanDefuseDistance
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 08 E1 3E 10 50 E8 1F 71 1E 00 83 C4 08 3B C3
    CharacterHiddenRunAlpha
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 C0 E0 3E 10 50 E8 F5 6F 1E 00 83 C4 08 3B C3
    Now, find the first byte after all the wild cards that they differ in. I also did that for you

    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 08  E1 3E 10 50 E8 1F 71 1E 00 83 C4 08 3B C3
    CharacterHiddenRunAlpha
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 C0  E0 3E 10 50 E8 F5 6F 1E 00 83 C4 08 3B C3
    Now take away everything after that byte
    MaxCanDefuseDistance
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 08
    CharacterHiddenRunAlpha
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 C0
    you now have 2 working patterns

    if you hit CTRL+B and paste
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 C0
    and then search, you will land at the address that contains 0x90.

    Now you can implement this pattern into your code, but make a note you must add X amount of bytes depending on how far the offset is in the code. In this case, the offset is 3 bytes in so when you declare your offset with your findpattern function, make sure to add that many bytes in

    good luck!
    Last edited by dakr54; 01-08-2013 at 09:36 PM.

  2. The Following 5 Users Say Thank You to dakr54 For This Useful Post:

    Fly3r (01-09-2013),HLBOT (02-22-2013),Pingo (01-08-2013),TonyMane() (05-16-2015),zFreeLove (12-14-2015)

  3. #2
    Pingo's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    687
    Reputation
    24
    Thanks
    865
    My Mood
    Blah
    Good tut, nice and clear for those who don't already know.

  4. The Following User Says Thank You to Pingo For This Useful Post:

    dakr54 (01-08-2013)

  5. #3
    dakr54's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    396
    Reputation
    16
    Thanks
    669
    yea i was one of those people so i decided to learn to help those who don't know out

  6. #4
    3D's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    In The World :P
    Posts
    1,007
    Reputation
    134
    Thanks
    14,169
    My Mood
    Amazed
    Good Jop Nice tut

  7. The Following User Says Thank You to 3D For This Useful Post:

    dakr54 (01-09-2013)

  8. #5
    remzkee0903's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Philippines
    Posts
    294
    Reputation
    11
    Thanks
    368
    My Mood
    Angelic
    Is it different with AddysLogger? It's a bit harder and confusing compare to it..
    -SiLent But DeadLy-

  9. #6
    dakr54's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    396
    Reputation
    16
    Thanks
    669
    you're suppose to use this for your addy logger.

  10. #7
    Intellectual's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    GDI
    Posts
    5,389
    Reputation
    785
    Thanks
    16,091
    My Mood
    Yeehaw
    Quote Originally Posted by remzkee0903 View Post
    Is it different with AddysLogger? It's a bit harder and confusing compare to it..
    you need to use these patterns for your addy logger
    nice job dakr

  11. The Following User Says Thank You to Intellectual For This Useful Post:

    dakr54 (01-09-2013)

  12. #8
    rabir007's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Location
    Behind you...
    Posts
    2,323
    Reputation
    148
    Thanks
    1,925
    My Mood
    Bored
    Quote Originally Posted by dakr54 View Post
    Okay many of you may not know how to do this or are just using patterns without knowing how to find them or update them yourself, so I will teach you the process of making a byte pattern.

    CharacterHiddenRunAlpha

    Okay the first thing you wanna do is load up your debugger and cshell and then navigate to the above string and find the offset.
    Code:
    0x90
    Great, now how do we make a pattern for it? Simple, we look at the bytes and figure out what changes and make a pattern that can be searched for based off of that!

    Now, Look at the bytes next to the disassembly, it reads
    Code:
    10192FEB      |       D99C11 90000000   |    FSTP DWORD PTR DS:[ECX+EDX+90]
    The bytes that pertain to this line are 0xD9 0x9C 0x11 0x90 0x00 0x00 0x00 0x00. Hit CTRL + B and type this in

    Code:
    D9 9C 11 90
    then search. You will land exactly at the address containing the offset, but what is the guarantee that the bytes will always be the same? we don't know exactly, and that's why pattern scanning can be a good thing. let me just lay down a few things here, anytime we see a byte that is likely to change we replace it with a ?? (i'm not using any code so i'm just showing you the binary string scans in ollydbg), also 0x00 is a wildcard also but a trailing null byte and won't be needed for a pattern scan. Everything else is okay to put in your pattern.

    Okay, lets start off with the simplest assumption, that only 0x90 will change, so we change the 0x90 to ?? (dont include the ?? since it's trailing)
    Code:
     D9 9C 11
    What happens when you search this? You actually don't land on the exact address, which can be a problem. Most of the time you cant make a unique pattern from that single line, you have to do some tinkering. What should have happened is that you should have landed on the address with the offset for MaxCanDefuseDistance, since many offsets will share similar byte patterns, you must expand on your byte pattern.

    MaxCanDefuseDistance looks like this
    Code:
     D9 9C 11 84
    So what you need to do is take some bytes from both strings and compare them to see where they differ, and that is where you can make a unique pattern. From MaxCanDefuseDistance I took this:
    Code:
    D9 9C 11 84 00 00 00 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 08 E1 3E 10 50 E8 1F 71 1E 00 83 C4 08 3B C3
    While for CharacterHiddenRunAlpha I took this:
    Code:
    D9 9C 11 90 00 00 00 8B 4C 24 30 3B CB 74 0D 8B44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C24 30 8B 04 B9 68 C0 E0 3E 10 50 E8 F5 6F 1E 00 83 C4 08 3B C3
    You then had to find out where they differ and here, I did it for you

    MaxCanDefuseDistance
    Code:
    D9 9C 11 84 00 00 00 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 08 E1 3E 10 50 E8 1F 71 1E 00 83 C4 08 3B C3
    CharacterHiddenRunAlpha
    Code:
    D9 9C 11 90 00 00 00 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 C0 E0 3E 10 50 E8 F5 6F 1E 00 83 C4 08 3B C3
    Obviously 0x84 and 0x94 are both offsets that you want to edit, so make them wildcards. Also, make all the 0x00's wild cards.

    MaxCanDefuseDistance
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 08 E1 3E 10 50 E8 1F 71 1E 00 83 C4 08 3B C3
    CharacterHiddenRunAlpha
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 C0 E0 3E 10 50 E8 F5 6F 1E 00 83 C4 08 3B C3
    Now, find the first byte after all the wild cards that they differ in. I also did that for you

    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 08  E1 3E 10 50 E8 1F 71 1E 00 83 C4 08 3B C3
    CharacterHiddenRunAlpha
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 C0  E0 3E 10 50 E8 F5 6F 1E 00 83 C4 08 3B C3
    Now take away everything after that byte
    MaxCanDefuseDistance
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 08
    CharacterHiddenRunAlpha
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 C0
    you now have 2 working patterns

    if you hit CTRL+B and paste
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 C0
    and then search, you will land at the address that contains 0x90.

    Now you can implement this pattern into your code, but make a note you must add X amount of bytes depending on how far the offset is in the code. In this case, the offset is 3 bytes in so when you declare your offset with your findpattern function, make sure to add that many bytes in

    good luck!
    Thanks now i would make my own logger...







  13. The Following User Says Thank You to rabir007 For This Useful Post:

    dakr54 (01-09-2013)

  14. #9
    AxiomFlux's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    EST
    Posts
    406
    Reputation
    10
    Thanks
    406
    My Mood
    Amazed
    nice tutorial dude... this should be stickied... doesn't mean it will be.

  15. The Following User Says Thank You to AxiomFlux For This Useful Post:

    dakr54 (01-09-2013)

  16. #10
    dakr54's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    396
    Reputation
    16
    Thanks
    669
    Quote Originally Posted by AxiomFlux View Post
    nice tutorial dude... this should be stickied... doesn't mean it will be.
    it's okay i've already had my fair share of threads stickied.

  17. #11
    giniyat101's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Location
    Not telling.
    Posts
    1,935
    Reputation
    130
    Thanks
    1,380
    My Mood
    Dead
    SigMaker? :L


     



    [img]https://i43.photobucke*****m/albums/e367/DeteSting/Steam-update.gif[/img]

  18. The Following User Says Thank You to giniyat101 For This Useful Post:

    dakr54 (01-13-2013)

  19. #12
    dakr54's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    396
    Reputation
    16
    Thanks
    669
    Quote Originally Posted by giniyat101 View Post
    SigMaker? :L
    sigmaker is not effective if you don't know how to make a pattern. c+p a pattern from sigmaker likely won't work as you want it to. I usually just use sigmaker so i don't have to write out the pattern /

  20. The Following User Says Thank You to dakr54 For This Useful Post:

    giniyat101 (01-13-2013)

  21. #13
    vinke2013's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    89
    Reputation
    10
    Thanks
    13
    Thx it helped a lot

  22. #14
    dakr54's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    396
    Reputation
    16
    Thanks
    669
    Quote Originally Posted by dakr54 View Post
    MaxCanDefuseDistance
    Code:
    D9 9C 11 84 00 00 00 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 08 E1 3E 10 50 E8 1F 71 1E 00 83 C4 08 3B C3
    CharacterHiddenRunAlpha
    Code:
    D9 9C 11 90 00 00 00 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 C0 E0 3E 10 50 E8 F5 6F 1E 00 83 C4 08 3B C3
    Obviously 0x84 and 0x94 are both offsets that you want to edit, so make them wildcards. Also, make all the 0x00's wild cards.

    MaxCanDefuseDistance
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 08 E1 3E 10 50 E8 1F 71 1E 00 83 C4 08 3B C3
    CharacterHiddenRunAlpha
    Code:
    D9 9C 11 ?? ?? ?? ?? 8B 4C 24 30 3B CB 74 0D 8B 44 24 34 2B C1 C1 F8 02 3B F8 72 06 FF D5 8B 4C 24 30 8B 04 B9 68 C0 E0 3E 10 50 E8 F5 6F 1E 00 83 C4 08 3B C3
    small error it's 0x90 not 0x94.

    thanks @grannycrazy

  23. The Following User Says Thank You to dakr54 For This Useful Post:

    grannycrazy (03-25-2013)

  24. #15
    grannycrazy's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    Beetlejuice
    Posts
    286
    Reputation
    10
    Thanks
    55
    My Mood
    Angelic
    Great Tutorial! Thank you!



  25. The Following User Says Thank You to grannycrazy For This Useful Post:

    dakr54 (05-27-2013)

Similar Threads

  1. how to make pic bytes
    By wicho_koz in forum Combat Arms Coding Help & Discussion
    Replies: 7
    Last Post: 02-13-2011, 08:21 PM
  2. How to make a working NFV Hack
    By System79 in forum Game Hacking Tutorials
    Replies: 1
    Last Post: 09-04-2006, 04:56 AM
  3. How to make the server run
    By wowhaxor in forum Gunz General
    Replies: 3
    Last Post: 05-25-2006, 09:59 PM
  4. How to make a Zombie
    By arunforce in forum Art & Graphic Design
    Replies: 2
    Last Post: 01-27-2006, 08:07 AM
  5. How I make wallhack?
    By RaidenDXX in forum WarRock - International Hacks
    Replies: 6
    Last Post: 01-23-2006, 01:28 PM