Skip to content

Instantly share code, notes, and snippets.

@SteveClement
SteveClement / cowrie-file-event.json
Last active September 22, 2021 06:43
cowrie misp integration
{
"Event": {
"id": "1167",
"orgc_id": "1",
"org_id": "1",
"date": "2021-09-22",
"threat_level_id": "4",
"info": "File uploaded to Cowrie (cowrie-ng)",
"published": false,
"uuid": "21cb5613-7061-4ce8-ac73-f22288deba36",
mkdir -p ~/tmp/mnt
cd ~/tmp
wget http://ftp.jaist.ac.jp/pub/Linux/ubuntu-releases/21.04/ubuntu-21.04-desktop-amd64.iso
sudo mkdir /mnt/iso
sudo mount -o loop ubuntu-21.04-desktop-amd64.iso /mnt/iso
sudo mount /mnt/iso/casper/filesystem.squashfs mnt
cd mnt
sudo find -type f > /tmp/f.lst
sudo rhash --crc32 --sha256 -M --sha256 --file-list=/tmp/f.lst --printf="%p/%f %s %c %m %h %{sha-256}\n" > /tmp/out.sfv
head /tmp/out.sfv
HC1:6BFOXN*TS0BI$ZDFRH5+FPWF9EIZ.0769Y3S3XHP+56R5-F9/17BOMEY4/OBMMD/GPWBILC9GGBYPLR-SNH10EQ928GEQW2DVJ5UL8W2BM8Q.L8SNCYNAK+FA7E7:4N3IK/4S1ARO4R48/3987CGSK37F/HS$*S-CK9B92FF9B9LW4G%89-8CNNM3LK.GVD9O-OEF82E9GX8$G10QVGB3O1KO-OAGJM*KIE9MIHJ6WH5URT2O%0D0H0 2IE9WT0K3M9UVZSVV*001HB*0UE9.955B9-NT0 2$$0X4PCY0+-CVYCDEBD0HX2JR$4O1K8KES/F-1J3.KBIH$GGK3MFDA.-B97U: KMZNDDS.SST*Q-+RV%NI%KH NWBRZ+P4+O8%MPLIBDSUES$8R12CT28M.SY$NTWA 34+5E1-ST*QGTA4W7.Y7U015RD3J5:ZSINIT.958G+7I5.M438 -H9:6JSN:U70+VD-FMJQE$NEV3V+NPD545T.*KKZUM7HR2FV1IJP17MVMGJ+:6Z$V1-I9BUDO33.G:LF
{
"type": "bundle",
"id": "bundle--cf20f99b-3ed2-4a9f-b4f1-d660a7fc8241",
"spec_version": "2.0",
"objects": [
{
"type": "intrusion-set",
"id": "intrusion-set--da1065ce-972c-4605-8755-9cd1074e3b5a",
"created": "2015-05-15T09:00:00.000Z",
"modified": "2015-05-15T09:00:00.000Z",
@SteveClement
SteveClement / install_ffmpeg_libfdkaac.sh
Last active August 6, 2020 10:05 — forked from rafaelbiriba/install_ffmpeg_libfdkaac.sh
Install FFmpeg with libfdk_aac support (For Ubuntu)
# Criando um script .sh para executar todos os comandos
#user@servidor:~$ wget https://gist.githubusercontent.com/SteveClement/26d9c9035c635fb7bff05ff8eacd1a94/raw/d3a82be86039f72f25f8d2b8cbc6d5299be75cac/install_ffmpeg_libfdkaac.sh
#user@servidor:~$ chmod +x install_ffmpeg_libfdkaac.sh
#user@servidor:~$ ./install_ffmpeg_libfdkaac.sh
YOLO="true" # Living on the bleeding edge
x265="true" # Include libx265
mkdir -p ~/bin
@SteveClement
SteveClement / explode.sh
Created April 16, 2020 05:45
Explode video file with ffmpeg
#!/usr/bin/env bash
INPUT_FILE="${1}"
if [[ ! -f "${1}" ]]; then
echo "File "${1}" does not exist"
exit -1
fi
if [[ ${INPUT_FILE} == *"/"* ]]; then
echo "Slash exists"
@SteveClement
SteveClement / pullMergePush.sh
Created November 15, 2019 01:01
pull, merge and push my MISP branches
#!/usr/bin/env bash
BASE="2.4"
CURRENT_BRANCH=$(git branch | grep ^\* |cut -f 2 -d\ )
git checkout $BASE && git fetch upstream
git merge upstream/$BASE && git push
# gh-pages (not needed, will be done during doc regen)
@SteveClement
SteveClement / jsonschema
Created November 29, 2018 04:52
jsonschema script in case it is missing
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from jsonschema.cli import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
########### Checking Requirements ###########
[OK] Docker is Installed. Output: Docker version 18.06.1-ce, build e68fc7a
[OK] Git is Installed. Output: git version 2.19.1
[OK] Check: https://misp.dcso.de
Result: * Connected to misp.dcso.de (185.183.127.100) port 443 (#0).
[OK] Check: https://dockerhub.dcso.de/v2/
Result: * Connected to dockerhub.dcso.de (217.110.69.251) port 443 (#0).
[OK] Check: https://github.com/DCSO/misp-dockerized
Result: * Connected to github.com (192.30.255.113) port 443 (#0).
@SteveClement
SteveClement / twotwo-wayland.sh
Last active February 28, 2024 10:08 — forked from bhundven/nineteen-wayland.sh
Enlightenment 22 build script for Ubuntu/Debian with Wayland support.
#!/bin/bash
# vi: ts=4:sw=4:et
#
# twotwo.sh
# This script allows you to install/update Enlightenment 22 git version on
# Ubuntu 18.04 or Debian buster (testing), or remove E22 git from your system.
# ********************************************************************
# * This version builds enlightenment with wayland. *
# * That means this requires a very recent Ubuntu or Debian version. *
# * This may not work properly! You've been warned! *