Skip to content

Commit e6c948c

Browse files
committed
1 parent 08e03d9 commit e6c948c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1006
-424
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@ All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

55

6+
7+
8+
## [1.1.0] - 2020-23-01
9+
10+
### Added
11+
- added Dark Theme Support
12+
- added ETW monitoring of the processProvider
13+
-- allows to capture all process cration events henc elisting of very short lived processes
14+
-- using ETW data to set image path and command line when the process closed before we could inspect it
15+
- added option to keep processes listed indefinetly as long as thay have still running children.
16+
- added functionality to find some types of hidden processes, also usefull to find some already terminated processes
17+
- added tool bar button to switch between the tree view and a list view more convinient as the last choose list sort column is remembered
18+
19+
### Changed
20+
- the handle tab is now present twice once as it was and once providing only an open file list
21+
22+
### Fixed
23+
- handle types are now sorted properly i.e. "[All]" is first
24+
- fixed bug where in the unifyed list view switching to tree view was not possible
25+
- fixed issue with some values not being initialized in CWinMainModule
26+
- fixed High DPI scaling issues
27+
28+
29+
630
## [1.0.2] - 2019-12-24
731

832
### Added

TaskExplorer/API/Windows/Monitors/Etw/krabs.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@
4646
#include "krabs/tdh_helpers.hpp"
4747
#include "krabs/kernel_providers.hpp"
4848

49-
#include "krabs/testing/proxy.hpp"
49+
/*#include "krabs/testing/proxy.hpp"
5050
#include "krabs/testing/filler.hpp"
5151
#include "krabs/testing/synth_record.hpp"
5252
#include "krabs/testing/record_builder.hpp"
5353
#include "krabs/testing/event_filter_proxy.hpp"
54-
#include "krabs/testing/record_property_thunk.hpp"
54+
#include "krabs/testing/record_property_thunk.hpp"*/
5555

5656
#include "krabs/filtering/view_adapters.hpp"
5757
#include "krabs/filtering/comparers.hpp"

TaskExplorer/API/Windows/Monitors/EtwEventMonitor.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,37 @@ struct SEtwEventMonitor
105105
});
106106
kernel_trace.enable(file_provider);*/
107107

108+
proc_provider.add_on_event_callback([This](const EVENT_RECORD &record) {
109+
//qDebug() << "process event";
110+
krabs::schema schema(record);
111+
112+
if (schema.event_id() != 0)
113+
return;
114+
115+
int Type = EventTypeUnknow;
116+
switch (schema.event_opcode())
117+
{
118+
case 1: Type = EtwProcessStarted; break;
119+
case 2: Type = EtwProcessStopped; break;
120+
default: // we dont care for other event types
121+
return;
122+
}
123+
124+
krabs::parser parser(schema);
125+
126+
quint32 ProcessId = parser.parse<uint32_t>(L"ProcessId");
127+
QString CommandLine = QString::fromStdWString(parser.parse<wstring>(L"CommandLine"));
128+
QString FileName = QString::fromStdString(parser.parse<string>(L"ImageFileName"));
129+
quint32 ParentId = parser.parse<uint32_t>(L"ParentId");
130+
131+
//qDebug() << FILETIME2time(schema.timestamp().QuadPart) << GetTime();
132+
133+
emit This->ProcessEvent(Type, ProcessId, CommandLine, FileName, ParentId, schema.timestamp().QuadPart);
134+
135+
});
136+
kernel_trace.enable(proc_provider);
137+
138+
108139
auto net_callback = [](CEtwEventMonitor* This, const EVENT_RECORD &record) {
109140
//qDebug() << "net event";
110141

@@ -267,6 +298,7 @@ struct SEtwEventMonitor
267298

268299
krabs::kernel::disk_io_provider disk_provider;
269300
//krabs::kernel::file_io_provider file_provider;
301+
krabs::kernel::process_provider proc_provider;
270302
krabs::kernel::network_tcpip_provider tcp_provider;
271303
krabs::kernel::network_udpip_provider udp_provider;
272304

TaskExplorer/API/Windows/Monitors/EtwEventMonitor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class CEtwEventMonitor : public QObject
1616
void DnsResEvent(quint64 ProcessId, quint64 ThreadId, const QString& HostName, const QStringList& Results);
1717
void FileEvent(int Type, quint64 FileId, quint64 ProcessId, quint64 ThreadId, const QString& FileName);
1818
void DiskEvent(int Type, quint64 FileId, quint64 ProcessId, quint64 ThreadId, quint32 IrpFlags, quint32 TransferSize, quint64 HighResResponseTime);
19+
void ProcessEvent(int Type, quint32 ProcessId, QString CommandLine, QString FileName, quint32 ParentId, quint64 TimeStamp);
1920

2021
protected:
2122

TaskExplorer/API/Windows/ProcessHacker.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ extern "C" {
2929
#include <kphuserp.h>
3030
}
3131

32-
3332
QString CastPhString(PPH_STRING phString, bool bDeRef)
3433
{
3534
QString qString;
@@ -50,20 +49,6 @@ PPH_STRING CastQString(const QString& qString)
5049
return PhCreateStringFromUnicodeString(&ustr);
5150
}
5251

53-
// MSDN: FILETIME Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).
54-
55-
quint64 FILETIME2ms(quint64 fileTime)
56-
{
57-
if (fileTime < 116444736000000000ULL)
58-
return 0;
59-
return (fileTime - 116444736000000000ULL) / 10000ULL;
60-
}
61-
62-
time_t FILETIME2time(quint64 fileTime)
63-
{
64-
return FILETIME2ms(fileTime) / 1000ULL;
65-
}
66-
6752
/*
6853
BOOLEAN PhInitializeNamespacePolicy(
6954
VOID

TaskExplorer/API/Windows/ProcessHacker.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@
7070
QString CastPhString(PPH_STRING phString, bool bDeRef = true);
7171
PPH_STRING CastQString(const QString& qString);
7272

73-
quint64 FILETIME2ms(quint64 fileTime);
74-
time_t FILETIME2time(quint64 fileTime);
75-
7673
// Missing phlib definitions
7774
extern "C" {
7875
VERIFY_RESULT NTAPI PhVerifyFileCached(_In_ PPH_STRING FileName, _In_opt_ PPH_STRING PackageFullName, _Out_opt_ PPH_STRING *SignerName, _In_ BOOLEAN CachedOnly);
@@ -86,6 +83,3 @@ int InitPH(bool bSvc = false);
8683
STATUS InitKPH(QString DeviceName, QString FileName, int SecurityLevel);
8784

8885
void PhShowAbout(QWidget* parent);
89-
90-
91-

TaskExplorer/API/Windows/WinModule.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,14 @@ STATUS CWinModule::Unload(bool bForce)
553553
//////////////////////////////////////////////////////////////////////////////////////////////////////
554554
// CWinMainModule
555555

556+
CWinMainModule::CWinMainModule(QObject *parent)
557+
: CWinModule(-1, false, parent)
558+
{
559+
m_ImageSubsystem = 0;
560+
m_PebBaseAddress = 0;
561+
m_PebBaseAddress32 = 0;
562+
}
563+
556564
bool CWinMainModule::InitStaticData(quint64 ProcessId, const QString& FileName, bool IsSubsystemProcess, bool IsWow64)
557565
{
558566
QWriteLocker Locker(&m_Mutex);

TaskExplorer/API/Windows/WinModule.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class CWinMainModule : public CWinModule
103103
{
104104
Q_OBJECT
105105
public:
106-
CWinMainModule(QObject *parent = nullptr) : CWinModule(-1, false, parent) {}
106+
CWinMainModule(QObject *parent = nullptr);
107107
virtual ~CWinMainModule() {}
108108

109109
virtual quint16 GetImageSubsystem() const { QReadLocker Locker(&m_Mutex); return m_ImageSubsystem; }

0 commit comments

Comments
 (0)