Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Vulnerability Report: BinaryFormatter security vulnerability #1

Open
ykytutou opened this issue Dec 8, 2021 · 1 comment
Open

Comments

@ykytutou
Copy link

ykytutou commented Dec 8, 2021

Risk Class:SinGooCMSUtility/SinGooCMS.Utility/Net/SocketClient.cs

image

Set up socket communication

server :
image

client :
image

Constructing the payload

The ReceiveVarData() method internally first calls the ReceiveFixData() method to read the packet header (8 bytes) of the socket object information, and then calls the GetPacketLength() method to read the length of the bytes in the packet header (int type)
The ReceiveFixData() method will first intercept 8 bytes of information, so 8 bytes must be added before the original payload when constructing the POC.
The GetPacketLength() method reads the packet header information, i.e. the 8 bytes of information needs to contain the byte length (int type) of the original payload, while intercepting the int data type before the ' * ' ending.
Also the Payload source code is converted to a byte array length of 3110 bytes.
A local test of the GetPacketLength() method shows that the 8 bytes of information could be "3110 ****". Int(3110) is the byte length of the original payload.

Simulating the transmission of messages to a socket client

POC implementation using a controlled data transfer from the server to the socket client, i.e. a set payload.
image
image
image

@ykytutou
Copy link
Author

ykytutou commented Dec 8, 2021

The payload here:https://github.com/ykytutou/Payload

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant