Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 26.05.2006, 02:25   #1
HongK
Архивный участник
 
Join Date: Jun 2005
Posts: 258
Default Analysis of Linex.dll

I know it has been mentioned that there is a possible backdoor for the linex.dll. I think someone said it was related to SQL. I did find something else interesting in this file, namely that it imports wsock32.dll which is used for socket communication. Here is the code I was looking at relating to this as well:

L100077E4:
db 66h; 'f'
db C7h; '‡'
db 45h; 'E'
db D8h; '˜'
db 02h;
db 00h;
db 68h; 'h'
dd SSZ1000A18C_0_0_0_0
call jmp_wsock32.dll!inet_addr
cmp eax,FFFFFFFFh
jnz L10007800
push 00000000h
call jmp_kernel32.dll!ExitProcess
L10007800:
mov [ebp-24h],eax
mov edx,[ebp+08h]
push edx
call jmp_wsock32.dll!htons
mov [ebp-26h],ax
lea eax,[ebp-28h]
mov ecx,[esi+10h]
push 00000010h
push eax
push ecx
call jmp_wsock32.dll!bind

cmp eax,FFFFFFFFh
jnz L1000782A
push 0053D7DAh
retn
;------------------------------------------------------------------------------
L1000782A:
mov edx,[esi+10h]
push 00000005h
push edx
call jmp_wsock32.dll!listen
cmp eax,FFFFFFFFh
jnz L10007840
push 0053D807h
retn


Of particular interest to me was the push of what appears to be 3 arguments passed to the bind function. In C it would look something like this:

int bind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen);

Why would this dll be creating a listening port? :O
HongK is offline  
Old 26.05.2006, 04:55   #2
horyfilipe
Архивный участник
 
Join Date: Jul 2005
Posts: 242
Default

i know it may has nothing to do with this but how do this dll comunicates with SQL? It is not using ODBC and not using sockets.. what is the other way?
horyfilipe is offline  
Old 26.05.2006, 05:49   #3
testdude
Архивный участник
 
Join Date: Nov 2005
Posts: 504
Default

telnet to the port that it binds, see what happens o.O
testdude is offline  
Old 26.05.2006, 08:32   #4
drugolo
Архивный участник
 
Join Date: Jun 2005
Posts: 93
Default

linex replaces the standard socket binding of L2Server.
try change the pushed IP (Bind) given as parameter and you will see that the server will bind to that interface (by default it binds to 0.0.0.0)

Why this? to simply avoid the infamous socket overflow. (probably)
drugolo is offline  
Old 26.05.2006, 13:48   #5
HongK
Архивный участник
 
Join Date: Jun 2005
Posts: 258
Default

Yes I noticed the IP it had defined was 0.0.0.0. Ok, well that's a bit more reassuring to know ...

Also to hory, it is actually using odbc ... You can find several references to the odbc windows dll along with several SQL references...
HongK is offline  
Old 26.05.2006, 14:24   #6
horyfilipe
Архивный участник
 
Join Date: Jul 2005
Posts: 242
Default

HongK, thanks but do you have any idea why it does not really use the ODBC? A prove of what I am saying is that you can just have no ODBC and it will still work if you have a local SQL installed. Otherwise, if you point ODBC to another server, still it will use local SQL. But try to stop local SQL.. it will not work anyway
horyfilipe is offline  
Old 26.05.2006, 21:33   #7
Silentz0r
Архивный участник
 
Join Date: Apr 2005
Posts: 122
Default

i think it uses a socket to 127.0.0.1:1433 directly.
Silentz0r is offline  
Old 26.05.2006, 23:00   #8
horyfilipe
Архивный участник
 
Join Date: Jul 2005
Posts: 242
Default

Oh well it does not.. I created a port forwarding from 0.0.0.0:1433 to remotesqlip:1433

then, I create a little program to connect to 127.0.0.1:1433, extract and insert some data in database TEST

This little program worked 100% ok.. and the data came and went to REMOTESQLIP through the port forward i created... but when tried to start l2server, no success on connecting to lin2db neither lin2world....
horyfilipe is offline  
Old 27.05.2006, 19:08   #9
kepler001
Архивный участник
 
Join Date: Jun 2005
Posts: 549
Default


remove dyes ?
kepler001 is offline  
Old 27.05.2006, 19:09   #10
kepler001
Архивный участник
 
Join Date: Jun 2005
Posts: 549
Default

read hxxp://bbs.99nets.com/read.php?tid=402143
kepler001 is offline  
Old 27.05.2006, 19:12   #11
sparcode
Архивный участник
 
Join Date: Dec 2005
Posts: 163
Default

Quote:
Originally Posted by kepler001
read hxxp://bbs.99nets.com/read.php?tid=402143
read ? !
sparcode is offline  
Old 27.05.2006, 19:21   #12
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

Damn, I can't translate 99nets with ANY online translators. :cry:
hel is offline  
Old 28.05.2006, 08:08   #13
xjazz
Архивный участник
 
Join Date: Feb 2006
Posts: 131
Default

Try this 1 http://babelfish.altavista.com/tr
xjazz is offline  
Old 28.05.2006, 08:18   #14
mantrastic
Архивный участник
 
Join Date: Apr 2006
Posts: 338
Default

cant with this one either xjazz , gives me blank pages each time tried both langs :<

edit : nm, solved , tnx.
mantrastic is offline  
Old 28.05.2006, 09:11   #15
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

xjazz:
It's always return me message in blank page.
Quote:
Forbidden, Please turn off CC
hel is offline  
Old 28.05.2006, 09:26   #16
mantrastic
Архивный участник
 
Join Date: Apr 2006
Posts: 338
Default

yep I always get that msg when i try to translate whole page :X
so I'm using lines by lines , and it sux , whats CC :\
mantrastic is offline  
Old 28.05.2006, 10:32   #17
sparcode
Архивный участник
 
Join Date: Dec 2005
Posts: 163
Default

ppl, please stop "analyzing" commercial dll's, please start analysing l2server.exe and share free
sparcode is offline  
Old 28.05.2006, 19:55   #18
HongK
Архивный участник
 
Join Date: Jun 2005
Posts: 258
Default

Unfortunately alot of functionality has to be added through dll hooks and since these are the only dll's out there, it's better to look at them and try to figure them out. Of particular interest would be finding the code that checks how many players are on to prevent the dll from functioning once more than 20 are online, as well as the time limit restriction that I've heard of. No doubt both those functions are well hidden in the dll, but they are there somewhere...

Unless someone else wants to try their hand at writing a free dll with the same functionality, then why not try and figure out the ones that are already out there?
HongK is offline  
Old 29.05.2006, 01:50   #19
kelviow2
Архивный участник
 
Join Date: Feb 2006
Posts: 40
Default

yes possible or not crack l2server
kelviow2 is offline  
Old 29.05.2006, 05:31   #20
sparcode
Архивный участник
 
Join Date: Dec 2005
Posts: 163
Default

Searching for "all ip overload" ...

100079A3 mov eax, ds:[highlight=red:b507bbc477]dword_1000A198[/highlight:b507bbc477] ; limit constant
100079A8 cmp [ebp+var_38], eax
100079AB jb short loc_100079DC
100079AD push dword ptr [ebp+in.S_un] ; in
100079B0 call inet_ntoa
100079B5 push eax
100079B6 push offset aAllIpOverloadD ; "All ip overload,Dissconnect [%s]!"

Change this number to any, you want:
1000A198 dword_1000A198 dd [highlight=red:b507bbc477]14h[/highlight:b507bbc477]

Enjoy.
sparcode is offline  
Old 29.05.2006, 05:41   #21
xjazz
Архивный участник
 
Join Date: Feb 2006
Posts: 131
Default

sparcode thx but i think the problem is to bring the dll work with the l2Server.exe.
xjazz is offline  
Old 17.06.2006, 18:59   #22
lexa
Архивный участник
 
Join Date: Aug 2005
Posts: 68
Default

sparcode молодец и правильно говорит
[eng]sparcode fine person and correctly speaks[eng]
lexa is offline  
Old 18.06.2006, 04:31   #23
ZADIRA
Архивный участник
 
Join Date: Mar 2006
Posts: 42
Default

и как тут делать?
когда я открываю l2server.exe, у меня стоит:
100079A3 db ? ;
что делать, когда на сервер не могут зайти более 15 человек?

/eng/
And how here to do? When I open l2server.exe,
at me costs:
100079A3 db ? ;
what to do, when on a server cannot come more than 15 person?
/eng/
ZADIRA is offline  
Old 22.06.2006, 04:18   #24
ZADIRA
Архивный участник
 
Join Date: Mar 2006
Posts: 42
Default

a в linex.dll offset начинается с 1008....
<eng>
in linex.dll offset beginen is 1008....
ZADIRA is offline  
Old 22.06.2006, 09:57   #25
Bacek
Архивный участник
 
Join Date: Apr 2006
Posts: 110
Default

Zadira use Winhex or something, there you can go from 0x000 offset or from entry point offset, or use serach for 3-4 bytes that is near the offset 1000A198 in exe file. And there changde 14h to whatever you want!
Bacek is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 19:35.