Skip to content

Commit

Permalink
fix: Fixed key to ParentPGUID. Removed PID hex conversion process #49
Browse files Browse the repository at this point in the history
  • Loading branch information
fukusuket committed Oct 7, 2023
1 parent 75bf9b6 commit 23280ae
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/takajopkg/timelineSuspiciousProcesses.nim
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ proc timelineSuspiciousProcesses(level: string = "high", output: string = "", qu
ruleTitle = jsonLine["RuleTitle"].getStr()
computer = jsonLine["Computer"].getStr()
process = jsonLine["Details"]["Proc"].getStr()
pidStr = jsonLine["Details"]["PID"].getStr()
try:
pidStr = intToStr(fromHex[int](pidStr))
except ValueError:
discard # conversion errors in fromHex are assumed to have originally been decimal.
pidStr = $jsonLine["Details"]["PID"].getInt()
user = jsonLine["Details"]["User"].getStr()
lid = jsonLine["Details"]["LID"].getStr()
try:
Expand Down Expand Up @@ -115,7 +111,7 @@ proc timelineSuspiciousProcesses(level: string = "high", output: string = "", qu
ruleTitle = jsonLine["RuleTitle"].getStr()
computer = jsonLine["Computer"].getStr()
process = jsonLine["Details"]["Proc"].getStr()
pidInt = jsonLine["Details"]["PID"].getInt()
pidStr = $jsonLine["Details"]["PID"].getInt()
user = jsonLine["Details"]["User"].getStr()
lid = jsonLine["Details"]["LID"].getStr()
lguid = jsonLine["Details"]["LGUID"].getStr()
Expand Down Expand Up @@ -163,7 +159,7 @@ proc timelineSuspiciousProcesses(level: string = "high", output: string = "", qu
echo "RuleAuthor: " & ruleAuthor
echo "Cmdline: " & cmdLine
echo "Process: " & process
echo "PID: " & $pidInt
echo "PID: " & pidStr
echo "User: " & user
echo "LID: " & lid
echo "LGUID: " & lguid
Expand Down Expand Up @@ -196,7 +192,7 @@ proc timelineSuspiciousProcesses(level: string = "high", output: string = "", qu
singleResultTable["ProcessGUID"] = processGuid
singleResultTable["ParentCmdline"] = parentCmdline
singleResultTable["ParentPID"] = parentPid
singleResultTable["ParentGUID"] = parentGuid
singleResultTable["ParentPGUID"] = parentGuid
singleResultTable["Description"] = description
singleResultTable["Product"] = product
singleResultTable["Company"] = company
Expand Down

0 comments on commit 23280ae

Please sign in to comment.