Skip to content

Instantly share code, notes, and snippets.

View dennythecoder's full-sized avatar

Denny dennythecoder

View GitHub Profile
@dennythecoder
dennythecoder / Library Monitoring for SQL STIG.md
Created May 27, 2025 22:28
Software Library Monitoring for SQL STIG

Software Library Monitoring for SQL STIG

Intro

MS SQL Server Instance STIG requires a monitoring process for the software libraries associated with it. It seems odd that there are no apparent OOTB solutions to this problem. This STIG item also appears to be extremely redundant since so many controls are in place before a malicious actor could possibly get to this point. Not to mention that this control does not really provide fidelity on the integrity of the software libraries. Nonetheless, I am attempting to provide a potential solution for those that may Google this issue.

STIG Text

Rule Title

//https://stackoverflow.com/questions/79591547/unknown-json-stringify-issue
if (localStorage.balances == undefined) {
localStorage.setItem('balances', '{"ffdbddfaae": "0"}') // initialize balance so JSON doesn't error out
}
let balances = JSON.parse(localStorage.balances) // convert string to JSON object for further changes
let addToBalance = function(value, id) {
let key = id.replace(/[0-9]/g, '') // convert alphaumerical id string to only letters to not cause errors when using balances.(id)
if (key in balances) { // convert alphaumerical id string to only letters to not cause errors when using balances.(id) and check if id exists in balance object
@dennythecoder
dennythecoder / Naive Excel PowerShell Reader.md
Last active March 17, 2025 02:27
Naive Excel PowerShell Reader Implementation

If possible, use the module at Import Excel. It'll consider more edge cases.

I wrote this to handle a simple read of somewhat well-formed data in an Excel document like below. It has only been tested in a Windows environment without significant edge-cases considered.

SheetInventory

ID Title MyDate Quantity
@dennythecoder
dennythecoder / Power Apps - Populate Field with Current User.md
Last active January 14, 2025 00:51
Power Apps - Populate Field with Current User

Populate Field with Current User

Requires 'Office365Users' Connector.

What I'm doing here is prepopulating a field on an item form that references a people column in a SharePoint list.

Named formulas

CurrentUser = Office365Users.MyProfileV2();
@dennythecoder
dennythecoder / reactive.py
Last active August 15, 2024 01:38
wip python attempt at creating object with dynamic props
import inspect
def Reactive(obj):
class ReactiveObject(object):
def __init__(self, obj, storage):
self.storage = storage
self.obj = obj
def on_change(self, key, newValue, prevValue):
Academy of Management Annals/Current/https://journals.aom.org/action/showFeed?type=etoc&feed=rss&jc=annals
Academy of Management Annals/Cited/https://journals.aom.org/action/showMostCitedArticlesFeed?journalCode=annals
Academy of Management Journal/Current/https://journals.aom.org/action/showFeed?type=etoc&feed=rss&jc=amj
Academy of Management Journal/Cited/https://journals.aom.org/action/showMostCitedArticlesFeed?journalCode=amj
Academy of Management Perspectives/Current/https://journals.aom.org/action/showFeed?type=etoc&feed=rss&jc=amp
Academy of Management Perspectives/Cited/https://journals.aom.org/action/showMostCitedArticlesFeed?journalCode=amp
Academy of Management Discoveries/Current/https://journals.aom.org/action/showFeed?type=etoc&feed=rss&jc=amd
Academy of Management Discoveries/Cited/https://journals.aom.org/action/showMostCitedArticlesFeed?journalCode=amd
Academy of Management Learning & Education/Current/https://journals.aom.org/action/showFeed?type=etoc&feed=rss&jc=amle
Academy of Management L
@dennythecoder
dennythecoder / log.md
Last active January 11, 2022 01:06
LSASS Smartcard Error - Windows Logs

Application

Faulting application name: lsass.exe, version: 10.0.19041.1266, time stamp: 0x17c94394 Faulting module name: KERNELBASE.dll, version: 10.0.19041.1387, time stamp: 0x0b9a844a Exception code: 0xc000027b Fault offset: 0x000000000010b302 Faulting process id: 0x340 Faulting application start time: 0x01d8035af911766b Faulting application path: C:\Windows\system32\lsass.exe Faulting module path: C:\Windows\System32\KERNELBASE.dll

@dennythecoder
dennythecoder / ConsolidateSTIGChecklists.ps1
Created August 12, 2021 21:39
Example of consolidating STIG Checklists with PowerShell into a single CSV
$files = Get-ChildItem -Path "Y:\" *.ckl -r
$xmls = $files | % {[xml](get-content $_.FullName)}
$data = $xmls.Checklist | % {
$hostname = $_.Asset.HOST_NAME
#Vulns are each checklist item
$vulns = $_.STIGS.iSTIG.VULN
( $vulns | select @{Name="Host_Name";Expression={$hostname}},
STATUS,
@{Name="Vuln_Num"; Expression={$_.STIG_DATA[0].ATTRIBUTE_DATA}},
@dennythecoder
dennythecoder / dodBanner.js
Created August 4, 2021 02:04
Generic DoD Banner Popup Per Session for Webpage using JavaScript
(function(){
var hasAgreed = sessionStorage.getItem("has-agreed");
if(!hasAgreed){
var txt = ["You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only.",
"By using this IS (which includes any device attached to this IS), you consent to the following conditions:",
" - The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations.",
" - At any time, the USG may inspect and seize data stored on this IS.",
" - Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose.",
" - This IS includes security measures (e.g., authentication and access controls) to protect U