For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
| import boto3 | |
| # Use profiles that exist in your ~/.aws/credentials file | |
| # Add to the array with any additional profiles for this to work i.e. ["default","profile0","profile1"] etc. | |
| profiles = ["default"] | |
| assumable_accounts = {} | |
| assuming_accounts = [] |
| import boto3 | |
| client = boto3.client('iam', region_name="us-east-1") | |
| response = client.list_roles() | |
| roles = response.get("Roles") | |
| for role in roles: | |
| if "AWS" in role["AssumeRolePolicyDocument"]["Statement"][0]["Principal"]: | |
| print(role["RoleId"] + " " + role["RoleName"]) | |
| print(role["AssumeRolePolicyDocument"]["Statement"][0]["Principal"]["AWS"]) |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/env python | |
| ############################################################################################################### | |
| ## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script | |
| ## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift | |
| ##------------------------------------------------------------------------------------------------------------- | |
| ## [Details]: | |
| ## This script is intended to be executed locally on a Linux box to enumerate basic system info and | |
| ## search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text | |
| ## passwords and applicable exploits. |
| #!/usr/bin/python | |
| # imports here | |
| # Copyright 2012 TrustedSec, LLC. All rights reserved. | |
| # | |
| # This piece of software code is licensed under the FreeBSD license.. | |
| # | |
| # Visit http://www.freebsd.org/copyright/freebsd-license.html for more information. | |
| import socket,subprocess | |
| HOST = '192.168.12.45' # The remote host | |
| PORT = 443 # The same port as used by the server |
ssh -i keyfile.pem ubuntu@<ip>
sudo apt -y update && sudo apt -y upgrade
sudo apt install -y p7zip-full build-essential linux-image-extra-virtual linux-source
echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf
sudo update-initramfs -u
# to activate latest kernel| # Input Portion | |
| # Identifies syslog as a syslog type and rando security log | |
| input { | |
| file { | |
| path => "/var/log/syslog" | |
| type => "syslog" | |
| } | |
| file { | |
| path => "/opt/logsamp/sec.log" |
| // Node.js CheatSheet. | |
| // Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
| // Download: http://nodejs.org/download/ | |
| // More: http://nodejs.org/api/all.html | |
| // 0. Synopsis. | |
| // http://nodejs.org/api/synopsis.html |