Author Topic: ASM?  (Read 4171 times)

0 Members and 1 Guest are viewing this topic.

Offline abc

  • Hero Member
  • *****
  • Posts: 576
    • View Profile
ASM?
« on: March 05, 2007, 05:50:58 pm »
I'm thinking of working with hacks in games, But i'm curious to know, Is good amount of ASM knowledge is required for this? Also could someone explain exactly how a hack works? (As far as a 3d game hack (Counter-Strike:Source..etc)) As far as I know doesn't it edit a file? Sort of in Starcraft which would be storm.dll or battle.snp. I'm sorry if i'm way far from how a hack works.

I'm here to learn! Teach me!  :)

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: ASM?
« Reply #1 on: March 05, 2007, 06:15:49 pm »
Hacks are lame.

Offline abc

  • Hero Member
  • *****
  • Posts: 576
    • View Profile
Re: ASM?
« Reply #2 on: March 05, 2007, 06:20:47 pm »
Fun learning experience! :)

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: ASM?
« Reply #3 on: March 05, 2007, 06:39:25 pm »
I'd recommend looking into a more productive excursion.  If it interests you, google it.  As with anything, it's a good idea to fiddle around with some of the elementary concepts of the language (method, etc) before attempting a project.

Offline abc

  • Hero Member
  • *****
  • Posts: 576
    • View Profile
Re: ASM?
« Reply #4 on: March 05, 2007, 06:50:04 pm »
Yeah, I found myself at some websites with tutorials but I really hate sites that don't keep with updates...Most links are dead. But thanks.

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: ASM?
« Reply #5 on: March 05, 2007, 07:53:50 pm »
Well most CS hacks require either patching an address, hooking a call with the HL SDK, or something else. It isn't hard at all once you know fundemental ASM and are decent in debugging and calling conventions.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline abc

  • Hero Member
  • *****
  • Posts: 576
    • View Profile
Re: ASM?
« Reply #6 on: March 05, 2007, 07:58:26 pm »
Thanks

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: ASM?
« Reply #7 on: March 06, 2007, 03:02:10 am »
Don't take me as an expert on this, or someone who knows anything at all, but I think that most bool functions such as key verification can be overwritten with

start:
    ret 1

Followed by a series of null bytes (or not even, let whatever was there stay there), replacing the original function.

Am I wrong? Probably. :P
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: ASM?
« Reply #8 on: March 06, 2007, 09:48:54 am »
Am I wrong?
Yes.  ret x returns from the function popping x bytes from the stack.
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: ASM?
« Reply #9 on: March 06, 2007, 06:25:55 pm »
start:
    push 0x00000001
    ret 4

Is that better?
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: ASM?
« Reply #10 on: March 06, 2007, 07:00:43 pm »
Why not just

   ret

?
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: ASM?
« Reply #11 on: March 06, 2007, 08:25:22 pm »
To write a hack, you have to:

1. Load a .dll you wrote into memory.
Loading your own .dll puts as much code you need into the game's address space.

2. Find a place to hook into the game's code
You want to be able to hook into the code when a certain thing happens. For example, when you pull the trigger, when you receive a network packet, when somebody builds a unit, when somebody spends money, when the user types a command, or anything like that.

3. Add a hook into the game's code
You patch over part of the code with a "call hackfunction1()", for example. hackfunction1 generally has to run whatever commands were written over, and to ensure that variables don't accidentally get changed.

That's the main idea. From your hook, you can do anything. You can change variables, call the game's functions, send packets, add to a log, etc.

Hope that helps!

Offline abc

  • Hero Member
  • *****
  • Posts: 576
    • View Profile
Re: ASM?
« Reply #12 on: March 06, 2007, 09:46:12 pm »
To write a hack, you have to:

1. Load a .dll you wrote into memory.
Loading your own .dll puts as much code you need into the game's address space.

2. Find a place to hook into the game's code
You want to be able to hook into the code when a certain thing happens. For example, when you pull the trigger, when you receive a network packet, when somebody builds a unit, when somebody spends money, when the user types a command, or anything like that.

3. Add a hook into the game's code
You patch over part of the code with a "call hackfunction1()", for example. hackfunction1 generally has to run whatever commands were written over, and to ensure that variables don't accidentally get changed.

That's the main idea. From your hook, you can do anything. You can change variables, call the game's functions, send packets, add to a log, etc.

Hope that helps!


That was the most helpful post in this whole topic slowly along with Warrior and Sidoh..