Skip to content

Instantly share code, notes, and snippets.

@Mikaayenson
Mikaayenson / sample_chatgpt_security_use_case.py
Last active September 2, 2023 17:29
Sample use case to demonstrate applying the new chatGPT model to security summaries.
import openai
import requests
import textwrap
import uuid
# pip3 install openai requests
# setup the API credentials
es_username = "<your username>"
es_password = "<your password>"
es_url = "https://localhost:9200"
@veekaybee
veekaybee / chatgpt.md
Last active March 10, 2025 07:45
Everything I understand about chatgpt

ChatGPT Resources

Context

ChatGPT appeared like an explosion on all my social media timelines in early December 2022. While I keep up with machine learning as an industry, I wasn't focused so much on this particular corner, and all the screenshots seemed like they came out of nowhere. What was this model? How did the chat prompting work? What was the context of OpenAI doing this work and collecting my prompts for training data?

I decided to do a quick investigation. Here's all the information I've found so far. I'm aggregating and synthesizing it as I go, so it's currently changing pretty frequently.

Model Architecture

@djsime1
djsime1 / fz_forks.md
Last active November 18, 2024 18:34
Flipper Zero firmware differences

This document has moved!

This comparison list has been relocated into the Awesome Flipper Zero repository. While you can read still read an archived version in this gist, all future updates will take place in the new repository.

Last archived version (Adapted from Nano's original messages in the Unleashed firmware Discord.)

Flipper Zero firmware differences

:: Last updated July 10 2022. ::

At this point, it is probably easier to just use something like this: https://github.com/reznok/Spring4Shell-POC
- clone https://spring.io/guides/gs/handling-form-submission/
- you can skip right to gs-handling-form-submission/complete, no need to follow the tutorial
- modify it so that you can build a war file (https://www.baeldung.com/spring-boot-war-tomcat-deploy)
- install tomcat9 + java 11 (i did it on ubuntu 20.04)
- deploy the war file
- update the PoC (https://share.vx-underground.org/) to write the tomcatwar.jsp file to webapps/handling-form-submission instead of webapps/ROOT
@pmarreck
pmarreck / coinflip.bash
Created February 9, 2022 23:40
Simplest way to simulate a coin flip or toss on the Linux command line (in Bash; may work in other shells)
# return code is either 0 (success) or 1 (fail), so you can use it straight-up in logical statements
coinflip() { return $(($RANDOM%2)); }
coinflip && echo "heads" || echo "tails"
@trevor229
trevor229 / ambient_aprs.py
Created July 25, 2021 08:49
Script for using the Ambient Weather API to upload data to APRS/CWOP
# Ambient Weather API APRS/CWOP upload script from this thread https://www.wxforum.net/index.php?topic=36181.0
# Originally written by uajqq and Ron B.
# Modified by me (trevor229) for amateur radio use (added a few new variables)
# Be aware there are apparently some issues with the coordinates not being rounded properly in some cases. Read the thread above for more info. It works fine for me though.
# When using this script, make sure it is not running more than once per 5 minutes, as CWOP requests.
import os
from socket import *
from datetime import datetime, time
@ranuzz
ranuzz / conway_gol_pwp.py
Created June 9, 2021 02:29
Conway's Game of Life in Processing with Python
"""
https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
conway's game of life
"""
from random import randint
def gameOfLife(grid):
state = {}
rows = len(grid)
@mgraeber-rc
mgraeber-rc / analysis.md
Created March 4, 2021 21:08
Basic dynamic malware analysis with AMSI events

Step 1) Start an AMSI ETW trace from an elevated command prompt

logman start trace AMSITrace -p Microsoft-Antimalware-Scan-Interface (Event1) -o amsi.etl -ets

Step 2) Run your evil maldoc or script. Note: AMSI can capture runtime context of VBA, Excel4, JScript, VBScript, PowerShell, WMI, and .NET (4.8+) in-mem assembly loads

Step 3) Stop the AMSI trace

@mgraeber-rc
mgraeber-rc / MITRE_Attack_WindowsAppControl.csv
Created February 8, 2021 18:58
Windows-specific MITRE ATT&CK techniques application control prevention assessment. This is a first attempt to assess the extent to which application control solutions would mitigate/prevent attack techniques. Note: this highly subjective assessment assumes a system that enforces an application control solution that at a minimum allows all Windo…
ID Name MitigatedByAppControl Notes
T1001 Data Obfuscation Not Applicable Relevant sub-techniques addressed below
T1001.001 Junk Data No Technique is not necessarily related to the execution of arbitrary code on an endpoint.
T1001.002 Steganography Limited If custom attacker code were necessary to perform this technique, it would be prevented.
T1001.003 Protocol Impersonation Limited If custom attacker code were necessary to perform this technique, it would be prevented.
T1003 OS Credential Dumping Not Applicable Relevant sub-techniques addressed below
T1003.001 LSASS Memory Limited Built-in utilities exist to perform this technique. They would have to be explicitly blocked.
T1003.002 Security Account Manager Limited Built-in utilities exist to perform this technique. They would have to be explicitly blocked.
T1003.003 NTDS Limited Built-in utilities exist to perform this technique. They would have to be explicitly blocked.
T1003.004 LSA Secrets Limited Built-in utilities exist to perform this technique.