Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Receive pseudo data packet

Junior Spellweaver
Joined
Jun 8, 2013
Messages
153
Reaction score
6
I often receive pseudo-packets. Can someone tell me the principle? I looked up the source data! ! ! Less than 5? Why?


if (data.remaining() < 5) {
//op + static code + op == 5 bytes
log.error("收到伪造数据包: " + this);
return false;
}
 
Experienced Elementalist
Joined
Aug 6, 2021
Messages
220
Reaction score
54
The first 7 bytes of the server packet are 2 bytes size followed by 5 bytes encoded opcode.
The 5 bytes are a mix of obfuscated opcode as well as a static opcode.

For an example to help you visualize this, let say we have a packet of size 10, that's 0x0A in Hex.
The packet structure would look something like this {0x00, 0x0A, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}

The code you posted essentially checks if the encoded opcode length is not less than 5 otherwise it's not a valid encoded opcode size and therefore could be malicious.

I personally don't think it's valid to use such code anymore from a security perspective as the packet structures are public as well as the static opcodes and methods to obfuscate it, publicity of this code defeats the purpose of the code you posted. It could still be useful in the case where you are receiving packets that are not correctly formatted.

Regarding pseudo packets, your code shouldn't be hitting this chunk of code unless you're running an unsupported game client on an unsupported emulator.. or you're sending incorrectly formatted packets to your server ;)

Hope this helps.
 
Last edited:
Upvote 0
Junior Spellweaver
Joined
Jun 8, 2013
Messages
153
Reaction score
6
The first 7 bytes of the server packet are 2 bytes size followed by 5 bytes encoded opcode.
The 5 bytes are a mix of obfuscated opcode as well as a static opcode.

For an example to help you visualize this, let say we have a packet of size 10, that's 0x0A in Hex.
The packet structure would look something like this {0x00, 0x0A, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}

The code you posted essentially checks if the encoded opcode length is not less than 5 otherwise it's not a valid encoded opcode size and therefore could be malicious.

I personally don't think it's valid to use such code anymore from a security perspective as the packet structures are public as well as the static opcodes and methods to obfuscate it, publicity of this code defeats the purpose of the code you posted. It could still be useful in the case where you are receiving packets that are not correctly formatted.

Regarding pseudo packets, your code shouldn't be hitting this chunk of code unless you're running an unsupported game client on an unsupported emulator.. or you're sending incorrectly formatted packets to your server ;)

Hope this helps.
I may need to check the code here! ! ! It seems that all the codes are written in the same way. I use 100% complete client 4.3, and I don't know why I encountered such a problem! ! ! Can you help me recheck it, of course, when you have time?
 
Upvote 0
Experienced Elementalist
Joined
Aug 6, 2021
Messages
220
Reaction score
54
I may need to check the code here! ! ! It seems that all the codes are written in the same way. I use 100% complete client 4.3, and I don't know why I encountered such a problem! ! ! Can you help me recheck it, of course, when you have time?

I should have asked these initially, what is the problem you're having? and what do you mean exactly when you say they're pseudo-packets?

If you're using a genuine 4.3 client and it hasn't been downgraded, providing your emulator supports the version of 4.3 you're running, you should have no problems. This is why I guessed it being a compatibility problem.

With my time developing my own emulator, I've noticed there are upper and lower bounds when it comes to different versions of Aion if that makes sense.

Perhaps your emulator that you're running only supports late 4.3 versions meanwhile your version might be early 4.3 or vice versa.

You'll need to be more specific if you still have questions and concerns about getting your issue fixed.

Hope this helps.
 
Upvote 0
Junior Spellweaver
Joined
Jun 8, 2013
Messages
153
Reaction score
6
I should have asked these initially, what is the problem you're having? and what do you mean exactly when you say they're pseudo-packets?

If you're using a genuine 4.3 client and it hasn't been downgraded, providing your emulator supports the version of 4.3 you're running, you should have no problems. This is why I guessed it being a compatibility problem.

With my time developing my own emulator, I've noticed there are upper and lower bounds when it comes to different versions of Aion if that makes sense.

Perhaps your emulator that you're running only supports late 4.3 versions meanwhile your version might be early 4.3 or vice versa.

You'll need to be more specific if you still have questions and concerns about getting your issue fixed.

Hope this helps.
I have made him close to perfect 100% in the 4.3 repair, with new geography and new route assistance. When I think there should be something wrong, I should optimize the memory. How can I contact you quickly or do you have more contact information?
 
Upvote 0
Experienced Elementalist
Joined
Aug 6, 2021
Messages
220
Reaction score
54
I have made him close to perfect 100% in the 4.3 repair, with new geography and new route assistance. When I think there should be something wrong, I should optimize the memory. How can I contact you quickly or do you have more contact information?

No sorry, please post here if you have some questions.
 
Upvote 0
Back
Top