Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 18.02.2007, 10:36   #1
testdude
Архивный участник
 
Join Date: Nov 2005
Posts: 504
Default hLaPEx observation

well ive been working on an antibot system lately and while debugging hlapex i found a fatal flaw with its design... it hooks ws2_32.connect and changes it to connect to 127.0.0.1 and acts as a proxy between server <-> client... now he flaw is it depends on the authd port always being 2106/2222/5001-4(i think... well its something like that anyway xD).. so yeah, change the authd port to something else and it will detect it as the gameserver port and wont work... anyone with half a brain can get around this tho, but it gets rid of the average 10 year old that wants to crash ur server xP

just thought id share this lil observation with everyone...

mmm well just to make sure i just checked it again xP im pretty sure its 2106/2222 and 5001-4, but yeah u get the idea
testdude is offline  
Old 18.02.2007, 14:10   #2
dirkr
Архивный участник
 
Join Date: Nov 2006
Posts: 204
Default

pretty nice observation..
might really help get rid of the morons that just download hlapex from some cheatsite and just run it without knowing anything..

nice one
dirkr is offline  
Old 18.02.2007, 16:31   #3
DevilsAssociate
Архивный участник
 
Join Date: Jul 2006
Posts: 81
Default

sounds interesting

just like changing the protocal or the l2server.exe so the avg botter can't bot

thanks for the info
DevilsAssociate is offline  
Old 18.02.2007, 17:52   #4
testdude
Архивный участник
 
Join Date: Nov 2005
Posts: 504
Default

Quote:
Originally Posted by DevilsAssociate View Post
sounds interesting

just like changing the protocal or the l2server.exe so the avg botter can't bot

thanks for the info
its not AS easy as that xD but anyone with an unpacked version of hlapex could get around it...
testdude is offline  
Old 18.02.2007, 18:09   #5
sparcode
Архивный участник
 
Join Date: Dec 2005
Posts: 163
Default

Nice Thank you for information, testdude
sparcode is offline  
Old 18.02.2007, 19:23   #6
mcrabben7
Архивный участник
 
Join Date: Apr 2006
Posts: 461
Default

Don't forget to block and look out for the new L2PacketHack (l2phx) v3.1.1 by some russians. It's based off hLaPEx design, and it's completely unprotected.
mcrabben7 is offline  
Old 18.02.2007, 22:13   #7
hhk31257
Архивный участник
 
Join Date: May 2006
Posts: 166
Default

how do you change the auth port client side?
i know it is in engine.dll but not sure how to change it.

thanks for the help!
hhk31257 is offline  
Old 18.02.2007, 23:05   #8
dirkr
Архивный участник
 
Join Date: Nov 2006
Posts: 204
Default

lets put a detailed explenation on how to do it here so all ppl that wanna exploit it can just follow it here step by step ><
dirkr is offline  
Old 19.02.2007, 17:08   #9
TheTester
Архивный участник
 
Join Date: Oct 2006
Posts: 112
Default

inside.dpr (sorry for trash in code):
Code:
library inside;

uses
Windows, 
WinSock,
uBlowFish; 

const
WM_COPYDATA=$004A; 
WM_DATA=$0400+256; 
ID_RECV=0; 
ID_SEND=1;
LOOP_PCK=#$04#$01#$01#$01#$7F#$00#$00#$01#$61#$1E#$00#$00#$00#$00#$E2#$05#$88#$13#$01#$00#$00#$00#$00#$00#$92#$0C#$E2#$05#$4B#$BD#$6F#$A5;
title='hLaPEx (LineAge Packets EXplorer by Hint)';

type
TSocket=integer;
TLogData = record
    IP: String[15];
    Port: Cardinal;
  end;

var
old_connect: function(s: TSocket; name: PSockAddr; namelen: Integer): Integer; stdcall;
h:integer;
ws:string;
ImageBase: Cardinal;
FileName: array [0..MAX_PATH - 1] of Char;

function new_connect(s: TSocket; name: PSockAddr; namelen: Integer): Integer; stdcall;
var
  CDS: TCopyDataStruct;
  Data: TLogData;
begin
  Data.IP := inet_ntoa(name.sin_addr);
  Data.Port := ntohs(name.sin_port);
  if not ((Data.Port=2106) or (Data.Port=2222) or ((Data.Port>=5001) and (Data.Port<=5004))) then
      begin
       CDS.cbData := SizeOf(TLogData);
       CDS.lpData := @Data;
       h:=FindWindow(nil,PChar(title));
       if h=0 then MessageBoxA(0,'hLaPEx not found','Interceptor',MB_ICONERROR);
       SendMessage(h, WM_COPYDATA, 0, Integer(@CDS));
       name.sin_port:=htons(7777);
       name.sin_addr.S_addr:=inet_addr('xx.x.0.1');
      end;
  Result := old_connect(s,name,namelen);
end;

begin
h:=FindWindow(nil,PChar(title));
if h=0 then
    begin
     MessageBoxA(0,'hLaPEx not found','Interceptor',MB_ICONERROR);
     exit;
    end;
ImageBase:=GetModuleHandle(nil);
ZeroMemory(@FileName, SizeOf(FileName));
GetModuleFileName(ImageBase, @FileName, SizeOf(FileName));
ws:='wsock32.dll';
if (Pos('L2WALKER.EXE', AnsiUpper(@FileName))<>0) then ws:='ws2_32.dll';
HookProc(PChar(ws),'connect',@new_connect,@old_connect);
end.
Hm. Anymore sources? =)

<rus>Учи ассемблер</rus>
TheTester is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 14:47.