View live-coding-ksql.adoc

Live Coding a KSQL Application

Introduction

View AppUser.java
package com.example.demo.security;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author KMaji
*
*/
View setup.md

Tools

Before we kick off the workshop, let's make sure you have everything you need to get going. At a minimum, you'll need Node.js and npm installed. If you don't already have them installed, you can find downloaders here. If you already have Node.js but haven't updated it in a while, please be sure you have at least version 6.9.

You probably already have one, but make sure you have a code editor. If you're looking for a new one, I recommend VS Code.

The Front End App

The focus of the workshop will be on building a data API with Hapi.js which will serve an already-prepared front end application built with Angular. The Angular app displays data about Front End Masters instructors and allows users to add new instructors in. The idea is to progressively build the API such that it gives the Angular app what it needs to operate, all while becoming familiar with how Hapi.js works.

View clean_code.md

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

View inject.c
//
// Ref = src
// https://www.blackhat.com/docs/eu-17/materials/eu-17-Liberman-Lost-In-Transaction-Process-Doppelganging.pdf
//
#include <Windows.h>
#include <ntstatus.h>
#include "ntos.h"
VOID ProcessDoppelgänging(
View eternalblue_merge_shellcode.py
# This file has no update anymore. Please see https://github.com/worawit/MS17-010
import sys
from struct import pack
if len(sys.argv) < 4:
print('Usage: {} sc_x86 sc_x64 sc_out'.format(sys.argv[0]))
sys.exit()
sc_x86 = open(sys.argv[1], 'rb').read()
sc_x64 = open(sys.argv[2], 'rb').read()
View gist:e2c485f260ca5f1d943c4d7a59b707c0
DWORD Error, bytesIO;
NTSTATUS Status;
HANDLE hProcessToken = NULL, hNewToken = NULL, hTest;
BOOL bCond = FALSE;
SHELLEXECUTEINFO shinfo;
SID_IDENTIFIER_AUTHORITY MLAuthority = SECURITY_MANDATORY_LABEL_AUTHORITY;
TOKEN_MANDATORY_LABEL tml, *ptml;
PSID pIntegritySid = NULL;
STARTUPINFO si;
PROCESS_INFORMATION pi;
View eternalblue8_exploit.py
#!/usr/bin/python
from impacket import smb
from struct import pack
import os
import sys
import socket
'''
EternalBlue exploit for Windows 8 and 2012 by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)
View EventVwrBypass.cs
using System;
using System.Linq;
using System.Reflection;
using System.Configuration.Install;
using System.Runtime.InteropServices;
using Microsoft.Win32;
/*
InstallUtil.exe C# version of Event Viewer UAC bypass
View wcr.py
import re
import os,sys
import pefile
import struct
import zipfile
import hashlib
import StringIO
from Crypto import Random
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5,AES