Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   Analysis of Linex.dll (https://postpacific.loc-online.com/showthread.php?t=4567)

HongK 26.05.2006 02:25

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

horyfilipe 26.05.2006 04:55

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?

testdude 26.05.2006 05:49

telnet to the port that it binds, see what happens o.O

drugolo 26.05.2006 08:32

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)

HongK 26.05.2006 13:48

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...

horyfilipe 26.05.2006 14:24

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

Silentz0r 26.05.2006 21:33

i think it uses a socket to 127.0.0.1:1433 directly.

horyfilipe 26.05.2006 23:00

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....

kepler001 27.05.2006 19:08

http://bbs.99nets.com/attachment/Mon...205cff6bf4.jpg
remove dyes ?

kepler001 27.05.2006 19:09

read hxxp://bbs.99nets.com/read.php?tid=402143

sparcode 27.05.2006 19:12

Quote:

Originally Posted by kepler001
read hxxp://bbs.99nets.com/read.php?tid=402143

read ? ! :) :) ;)

hel 27.05.2006 19:21

Damn, I can't translate 99nets with ANY online translators. :cry:

xjazz 28.05.2006 08:08

Try this 1 http://babelfish.altavista.com/tr

mantrastic 28.05.2006 08:18

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

edit : nm, solved , tnx.

hel 28.05.2006 09:11

xjazz:
It's always return me message in blank page.
Quote:

Forbidden, Please turn off CC

mantrastic 28.05.2006 09:26

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 :\

sparcode 28.05.2006 10:32

ppl, please stop "analyzing" commercial dll's, please start analysing l2server.exe and share free :)

HongK 28.05.2006 19:55

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?

kelviow2 29.05.2006 01:50

yes possible or not crack l2server

sparcode 29.05.2006 05:31

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.

xjazz 29.05.2006 05:41

sparcode thx but i think the problem is to bring the dll work with the l2Server.exe.

lexa 17.06.2006 18:59

sparcode молодец и правильно говорит
[eng]sparcode fine person and correctly speaks[eng]

ZADIRA 18.06.2006 04:31

и как тут делать?
когда я открываю 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 22.06.2006 04:18

a в linex.dll offset начинается с 1008....
<eng>
in linex.dll offset beginen is 1008....

Bacek 22.06.2006 09:57

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!

ZADIRA 22.06.2006 19:27

please share good linex.dll and good l2server.exe plizz,
Very much I ask, I can not disassembly with this limit in any way, a current YOU can help (

hel 22.06.2006 19:46

Linex.dll never was good. :D

xarion 22.06.2006 20:17

+1

ZADIRA 23.06.2006 03:55

Well though without restriction of Online

enclava 23.06.2006 05:27

pls Where download Fully complet and rigth LINEX.DLL? Dropin my server.My Dynamic Library Linex.dll is bad. sorry for my english


All times are GMT. The time now is 16:23.