avivshabtay / stresser Goto Github PK
View Code? Open in Web Editor NEWAnti-Malware security solution for Windows environment.
License: MIT License
Anti-Malware security solution for Windows environment.
License: MIT License
Problem: If the main thread finish it's work but the application doesn't close yet (because other thread still running) it is possible to press CTRL+C and the "installed" handler keep on handling the interrupt.
It's better to remove the CTRL handler when the main thread as finish it's work.
Line 47 in 074cff6
This class will hold the configuration for the StresserApplication such as:
If FakeFile project:
Line 5 in 2c9366c
WinMain
used for GUI application, where wmain
used for console application.
Corresponding to ProcessArtifact
:
EtwManager register OnEventRecord
callback function for all the exists EtwEventType
.
We should change to logic, so this function will trigger other object which will handle specific event by the event type.
Possible solution whould be like:
class EtwManager
{
public:
// ....
private:
// Key = EventType
std::map<EventType, IEtwEventHandler*> m_handlers;
}
EtwManager:registerEventHandler(IEtwEventHandler handler, EventType type)
{
// Check if the handler already exists, throw....
// Otherwise, add the new handler:
this->handlers.insert({ type, handler });
}
EtwManager::OnEventRecord(PEVENT_RECORD record)
{
// extract event type (by opcode)
// int opcode = .....
switch(opcode)
{
case EventType::Registry:
{
try
{
const IEtwEventHandler* handler = this->handlers.get[EventType::Registry];
// Verify handler, otherwise throw...
handler->onEvent(record);
}
catch(// Case key doesn't exsits)
{
}
}
case EventType::IoFile: // other bulshit
{
}
}
}
You don't need this header here, only in the source file.
Maybe there is problem with you setup (Visual Studio).
Try to remove it and if it isn't solve the problem talk with me.
Originally posted by @AvivShabtay in #20 (comment)
Line 18 in ff0e956
WindowsEvent used for managing Win32 Event Object.
Common use case is to wait on the event object to be signaled.
Use case example from the main function:
Line 102 in d7bb59d
Need to add 2 useful methods:
wait(timeout)
- call to WaitForSingleObject with given valuewaitInfintly()
- call to previous method with timeout=INFINITEVisual Studio use absolute paths by default, we preferer using relatives ones.
Useful link:
https://mklimenko.github.io/english/2018/06/23/embed-resources-msvc/
Every entity in our application need to support serialization from Json
and to Json
for the HTTP operations preformed on the entity data.
Create interface named IJsonConverted (or other meaningful name) and make sure to implement it for all the enitities in the Stresser
project (Endpoint, Policy, Rule, Event).
The inerface should contains the method:
template<class Entity>
static Json convertFromEntity(Entity entity);
template<class Entity>
static Entity convertFromJason(Json data);
If the function isn't static, the class specifier is redundant and can be removed.
Fix in this functions:
Stresser/Stresser/FileArtifact.cpp
Line 5 in 2c9366c
Stresser/Stresser/FileArtifact.cpp
Line 10 in 2c9366c
Line 12 in 2c9366c
Many logs using DEBUG_PRINT macro to print logs only in Debug mode.
Should write these logs to log file in both cases of release and debug,
with adding more trace data (class/function that print the data, etc).
The logger should:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.