Closed luck00 closed 3 years ago
From the code:
def parseClientNetworkData(self, stream: BytesIO) -> ClientNetworkData:
channelCount = Uint32LE.unpack(stream)
data = stream.getvalue()[4 :]
if len(data) != channelCount * 12:
raise ParsingError("Invalid channel array size")
It looks like the PDU sent by the PoC has a malformed ClientNetworkData.
We would need to figure out if it's a parsing problem or if the PoC has a malformed packet.
We could also change the default behavior of PyRDP to forward raw bytes without attempting to parse them, which would probably be a good idea, but requires a ton of testing.
I try in the first place to exploit windows 7 machine with bluekeep meterpreter exploit. Is working directly, but through pyrdp is not working. Is pyrdp designed to work with that exploit? From there I try to use that poc to give me some errors.
I try to understand if I can use pyrdp to monitor bluekeep atacks.
PyRDP has a logging statement to monitor bluekeep exploit attempts, but the PoC will not go through IIRC
On Wed., Jun. 17, 2020, 14:56 luck00, notifications@github.com wrote:
I try in the first place to exploit windows 7 machine with bluekeep meterpreter exploit. Is working directly, but through pyrdp is not working. Is pyrdp designed to work with that exploit? From there I try to use that poc to give me some errors.
I try to understand if I can use pyrdp to monitor bluekeep atacks.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GoSecure/pyrdp/issues/235#issuecomment-645559476, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADPMNL26ZW3HSO4DGTCOSGDRXEGUZANCNFSM4OATNL7A .
@Res260 At the very least it should have detected and logged the exploitation attempt, which is not the case here. I think we'll need to look at the PoC and reproduce to understand the behavior / accomodate it.
And this is the console output when I try to exploit the host with meterpreter bluekeep.
[2020-06-18 13:43:49,030] - INFO - Cheryl901420 - pyrdp.mitm.connections.tcp - New client connected from 10.66.22.62
[2020-06-18 13:43:49,031] - INFO - Cheryl901420 - pyrdp.mitm.connections.x224 - Cookie: mstshash=BEFXlSN
[2020-06-18 13:43:49,033] - INFO - Cheryl901420 - pyrdp.mitm.connections.tcp - Server connected
[2020-06-18 13:43:50,035] - ERROR - Cheryl901420 - pyrdp.mitm.connections - Failed to connect to recording host: timeout expired
[2020-06-18 13:43:50,043] - INFO - Cheryl901420 - pyrdp.mitm.connections.tcp - Client connection closed. Connection to the other side was lost in a non-clean fashion: Connection lost.
[2020-06-18 13:43:50,044] - INFO - Cheryl901420 - pyrdp.mitm.connections.tcp - Connection report: report: 1.0, connectionTime: 1.0133814811706543, totalInput: 0, totalOutput: 0, replayFilename: rdp_replay_20200618_13-43-49_30_Cheryl901420.pyrdp
[2020-06-18 13:43:51,927] - INFO - Roland509059 - pyrdp.mitm.connections.tcp - New client connected from 10.66.22.62
[2020-06-18 13:43:51,928] - INFO - Roland509059 - pyrdp.mitm.connections.x224 - Cookie: mstshash=psAzmPF
[2020-06-18 13:43:51,930] - INFO - Roland509059 - pyrdp.mitm.connections.tcp - Server connected
[2020-06-18 13:43:52,932] - ERROR - Roland509059 - pyrdp.mitm.connections - Failed to connect to recording host: timeout expired
CLIENT_RANDOM e862e2c7e62165f1059da94772e24dac73a6d02e4fea5e127b15b55d2c39cf7c 07a55fc57e9bdc8e6176e348a48f52963e4b71ab88275f5d4d6cfecb8688d059063d394ae45006023bbb15d0e3ca3db4
[2020-06-18 13:43:52,958] - INFO - Roland509059 - pyrdp.mitm.connections.mcs - Bluekeep (CVE-2019-0708) scan or exploit attempt detected.
[2020-06-18 13:43:52,961] - INFO - Roland509059 - pyrdp.mitm.connections.mcs - Client hostname ethdev
CLIENT_RANDOM 9484f91ed21b13b123579ee21e52a600e304d0b472a484dd7916603486ba379f 86a1a08283d3b59c1b1db584dcec5ad291c798257748f72e6d59f44d6b3763098572967c27e6a0bee99a423868413e34
[2020-06-18 13:43:52,965] - INFO - Roland509059 - pyrdp.mitm.connections.mcs - cliprdr <---> Channel #1004
[2020-06-18 13:43:52,968] - INFO - Roland509059 - pyrdp.mitm.connections.mcs - MS_T120 <---> Channel #1005
[2020-06-18 13:43:52,968] - INFO - Roland509059 - pyrdp.mitm.connections.mcs - rdpsnd <---> Channel #1006
[2020-06-18 13:43:52,969] - INFO - Roland509059 - pyrdp.mitm.connections.mcs - snddbg <---> Channel #1007
[2020-06-18 13:43:52,970] - INFO - Roland509059 - pyrdp.mitm.connections.mcs - rdpdr <---> Channel #1008
[2020-06-18 13:43:52,997] - WARNING - Roland509059 - pyrdp.mitm.connections.rdpdr - Could not read the RDPDR file mapping at pyrdp_output/mapping.json. The file may not exist or it may have incorrect permissions. A new mapping will be created.
[2020-06-18 13:43:53,001] - INFO - Roland509059 - pyrdp.mitm.connections.security - Client Info: username = 'psAzmPF\x00', password = '\x00', domain = 'SCawezk\x00', clientAddress = '192.168.0.100\x00'
[2020-06-18 13:43:53,459] - INFO - Roland509059 - pyrdp.mitm.connections.tcp - Client connection closed. Connection to the other side was lost in a non-clean fashion.
[2020-06-18 13:43:53,459] - INFO - Roland509059 - pyrdp.mitm.connections.tcp - Connection report: report: 1.0, connectionTime: 1.5317463874816895, mcs: 16, mcsInput: 9, mcsInput_1003: 7, mcsOutput: 7, mcsOutput_1003: 6, slowPathOutput: 5, slowPathInput: 6, fastPathOutput: 9, mcsInput_1005: 2, virtualChannelInput: 2, mcsOutput_1008: 1, deviceRedirection: 1, deviceRedirectionServer: 1, totalInput: 11, totalOutput: 17, clientServerRatio: 0.6470588235294118, replayFilename: rdp_replay_20200618_13-43-51_926_Roland509059.pyrdp
[2020-06-18 13:43:55,866] - INFO - John381250 - pyrdp.mitm.connections.tcp - New client connected from 10.66.22.62
[2020-06-18 13:43:55,871] - INFO - John381250 - pyrdp.mitm.connections.x224 - Cookie: mstshash=PdHuoIe
[2020-06-18 13:43:55,872] - INFO - John381250 - pyrdp.mitm.connections.tcp - Server connected
[2020-06-18 13:43:56,875] - ERROR - John381250 - pyrdp.mitm.connections - Failed to connect to recording host: timeout expired
CLIENT_RANDOM a54b995123d6fc498e8b853229b790e6cb9bc4b74796824c1be9590322346304 c86ea726d700edefe95c212ff5c70ef18c1a73e79052e532829b713979fc939b55946a9fbe2fb7eff8e59c7e46d0ee7b
[2020-06-18 13:43:56,896] - INFO - John381250 - pyrdp.mitm.connections.mcs - Bluekeep (CVE-2019-0708) scan or exploit attempt detected.
[2020-06-18 13:43:56,897] - INFO - John381250 - pyrdp.mitm.connections.mcs - Client hostname ethdev
CLIENT_RANDOM 0773b47603b4c837e21cebf3508476f13948e28c412d3b76f5c0deca00a21150 a03ef772c461e8220a8cf998d9529196ab6d8d3c66d59168ab2d64569f5bf70c27b85602556a6865d9876f5a6d412320
[2020-06-18 13:43:56,900] - INFO - John381250 - pyrdp.mitm.connections.mcs - rdpdr <---> Channel #1004
[2020-06-18 13:43:56,901] - INFO - John381250 - pyrdp.mitm.connections.mcs - RDPSND <---> Channel #1005
[2020-06-18 13:43:56,902] - INFO - John381250 - pyrdp.mitm.connections.mcs - RDPSND <---> Channel #1006
[2020-06-18 13:43:56,902] - INFO - John381250 - pyrdp.mitm.connections.mcs - MS_XXX0 <---> Channel #1007
[2020-06-18 13:43:56,903] - INFO - John381250 - pyrdp.mitm.connections.mcs - MS_XXX1 <---> Channel #1008
[2020-06-18 13:43:56,904] - INFO - John381250 - pyrdp.mitm.connections.mcs - MS_XXX2 <---> Channel #1009
[2020-06-18 13:43:56,904] - INFO - John381250 - pyrdp.mitm.connections.mcs - MS_XXX3 <---> Channel #1010
[2020-06-18 13:43:56,905] - INFO - John381250 - pyrdp.mitm.connections.mcs - MS_XXX4 <---> Channel #1011
[2020-06-18 13:43:56,906] - INFO - John381250 - pyrdp.mitm.connections.mcs - MS_XXX5 <---> Channel #1012
[2020-06-18 13:43:56,907] - INFO - John381250 - pyrdp.mitm.connections.mcs - MS_T120 <---> Channel #1013
[2020-06-18 13:43:56,920] - WARNING - John381250 - pyrdp.mitm.connections.rdpdr - Could not read the RDPDR file mapping at pyrdp_output/mapping.json. The file may not exist or it may have incorrect permissions. A new mapping will be created.
[2020-06-18 13:43:56,933] - INFO - John381250 - pyrdp.mitm.connections.security - Client Info: username = 'PdHuoIe\x00', password = '\x00', domain = 'vVZYXOx\x00', clientAddress = '192.168.0.100\x00'
[2020-06-18 13:45:49,022] - INFO - John381250 - pyrdp.mitm.connections.tcp - Client connection closed. Connection to the other side was lost in a non-clean fashion: Connection lost.
[2020-06-18 13:45:49,024] - INFO - John381250 - pyrdp.mitm.connections.tcp - Connection report: report: 1.0, connectionTime: 113.15631318092346, mcs: 513549, mcsInput: 513540, mcsInput_1003: 7, mcsOutput: 9, mcsOutput_1003: 6, slowPathOutput: 5, slowPathInput: 6, fastPathOutput: 11, mcsOutput_1004: 3, deviceRedirection: 7, deviceRedirectionServer: 3, mcsInput_1004: 4, deviceRedirectionClient: 4, mcsInput_1005: 257854, virtualChannelInput: 513528, mcsInput_1006: 255674, fastPathInput: 250, totalInput: 1027322, totalOutput: 23, clientServerRatio: 44666.17391304348, replayFilename: `rdp_replay_20200618_13-43-55_866_John381250.pyrdp
Hello,
I am trying to use pyrdp with a windows 7 to act as a honeypot for rdp bluekeep exploit. I test the windows 7 vm directly and the bluekeep poc work. I am using https://github.com/Ekultek/BlueKeep/blob/master/bluekeep_poc.py . But if I try to run bluekeep_poc.py through pyrdp I receive this in pyrdp :
Can anybody help me?
Thank you very much.