Skip to content

Instantly share code, notes, and snippets.

View Clevero's full-sized avatar

Marcel Caspar Clevero

  • Frankfurt am Main
View GitHub Profile
#!/bin/bash
PAST_TIMESTAMP="$(date +%s -d '5 min ago')000"
mongoexport \
--csv --quiet \
--fields timestamp,source_ip,source_port,destination_ip,destination_port,honeypot \
--db mnemosyne \
--collection session \
--query "{ timestamp: {\$gt: new Date($PAST_TIMESTAMP)}}" > /tmp/mhn-report.txt
@Clevero
Clevero / SO33205298
Last active December 27, 2020 19:55
This is a powershell script that is downloaded via a Word Macro and executed. This was used in a proof of concept
param([string]$title)
"Called with parameter: $title" | Write-Output
New-Item new_file.txt -ItemType file
echo "You have been hacked" >> .\new_file.txt
echo "Please call your IT department for more information" >> .\new_file.txt