Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Bugfix: Windows.Detection.ForwardedImports #3860

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions artifacts/definitions/Windows/Detection/ForwardedImports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,36 @@ parameters:
- name: ExcludeRegex
default: WinSXS|Servicing
type: regex
- name: LogPeriod
type: int
description: How often to log progress in seconds (Default every 1 sec)
default: 1

sources:
- query: |
LET DLLs = SELECT OSPath, Name,
parse_pe(file=OSPath).Forwards AS Forwards,

-- Remove the .dll extension if present to get the bare dll filename.
lowcase(string=parse_string_with_regex(
regex="^(?P<BareName>[^.]+)", string=Name).BareName) AS DLLBareName

regex="^(?P<BareName>[^.]+)", string=Name).BareName) AS DLLBareName,
count() AS Total
FROM glob(globs=DLLGlob)
WHERE NOT OSPath =~ ExcludeRegex

LET ParsedDLLs = SELECT *,
log(message="Examining %v after checking %v DLLs",
args=[OSPath, Total], dedup= LogPeriod ) AS Log
FROM foreach(
row=DLLs, workers=20,
query={
SELECT OSPath, Name,
parse_pe(file=OSPath).Forwards AS Forwards,
DLLBareName, Total
FROM scope()
})

-- Speed up analysis a bit by using more workers.
SELECT * FROM foreach(row=DLLs, workers=20,
SELECT * FROM foreach(row=ParsedDLLs,
query={
SELECT OSPath AS DllPath, ForwardedImport,

Expand Down
9 changes: 9 additions & 0 deletions gui/velociraptor/src/components/artifacts/line-charts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ export class VeloLineChart extends React.Component {
}

toLocalX = x=>{
if(!_.isNumber(x)) {
return 0;
}

return x;
}

Expand Down Expand Up @@ -355,6 +359,11 @@ export class VeloLineChart extends React.Component {
animationDuration={300}
dot={false} />);
}

if(_.isEmpty(lines)) {
return <div>{T("No data")}</div>;
}

return (
<div onDoubleClick={this.zoomOut} >
<ResponsiveContainer width="95%"
Expand Down
Loading