Skip to content

Instantly share code, notes, and snippets.

View secana's full-sized avatar

Stefan Hausotte secana

View GitHub Profile
#r "nuget: System.IdentityModel.Tokens.Jwt"
#r "nuget: Microsoft.IdentityModel.Tokens"
open System.IdentityModel.Tokens.Jwt
open System
open System.IO
open System.Text
open System.Security.Claims
open System.IdentityModel.Tokens.Jwt
open Microsoft.IdentityModel.Tokens
@secana
secana / trh-evaluation-set.json
Last active October 6, 2020 08:30
TypeRefHash evaluation set
[
{
"sha256": "36d620278a2ffe8fb6f8df399165fb8691db8e53ce73a72ed50066c6f176f03f",
"detection": "asyncrat",
"typeRefHash": "4807b5cd7256fad54967dfe3c394c27d16bad1ac95b0306911a3546025bd6ccf"
},
{
"sha256": "3770960e4a955872b39b430e71f6804976f57a751c921f6f9ef51f8e250188ef",
"detection": "asyncrat",
"typeRefHash": "29c13841396d60c9788e67ed0a1f8ac0da391dffb5e9e56452882c2d33e710da"
@secana
secana / serialize.fsx
Created April 4, 2020 16:09
F# dict serialization error with SharpYaml
#r "nuget: SharpYaml"
open SharpYaml.Serialization
let serializer = Serializer()
let myRecord1 = {|
dict1 = ["key", "value"] |> dict
dict2 = ["differentKey", "differentValue"] |> dict
|}
@secana
secana / ValidCert.cs
Created December 10, 2017 22:17
Valid X509 Certificate which can be parsed under Windows but not Linux with "new X509Certificate2(...)"
namespace CertTest
{
public static class ValidCert
{
public static byte[] Cert =
{
0x30, 0x82, 0x3a, 0x57, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d,
0x01, 0x07, 0x02, 0xa0, 0x82, 0x3a, 0x48, 0x30, 0x82, 0x3a, 0x44, 0x02,
0x01, 0x01, 0x31, 0x0f, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01,
0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x30, 0x82, 0x19, 0x10, 0x06,