Ethical Hacking en AWS - [CPNA]
YoutubeTwitterLinkedIn
  • La Biblia del Hacking en AWS
    • ADVERTENCIA
    • AWS Community Builder
    • Conoce a tu academia
    • Conoce a tu instructor
    • Aprende con nuestro curso
    • Aprende con Spartan-CPNA
  • Introduccion al cloud computing
    • ¿Que es Cloud Computing?
    • Amazon Web Services
    • La historia detras de la transicion de On-Premises a la nube
      • Caracteristicas de On-Premises y Transición a la Nube
    • Importancia del cloud computing
    • ¿Vale la pena aprender cloud?
    • Modelos de informática en la nube
    • Infraestructura y Modelos de Despliegue en la Nube
    • Quiero aprender mas sobre la nube de AWS
    • Proveedores Principales de Cloud Computing
      • Amazon Web Services (AWS)
      • Microsoft Azure (Az)
      • Google Cloud Platform (GCP)
      • Comparación entre Proveedores
  • Componentes Clave y Tecnologías en la Nube
    • Introduccion a los componentes principales de la nube
    • Clasificación de los componentes de AWS
    • Virtualización: Conceptos Básicos y su Papel en la Nube
    • Introduccion a la Computación sin Servidor (Serverless)
      • Diferencias entre Monolítica y Serverless
  • Seguridad y Cumplimiento en la Nube
    • Seguridad en la nube
    • Modelo de responsabilidad compartida
    • Mejores Prácticas de Seguridad en la Nube
    • Cumplimiento y Normativas
    • CIS Benchmarks
  • Fundamentos Ofensivos
    • Introduccion al Curso Profesional de Pentesting para Juniors - [CPPJ]
    • ¿Por qué los atacantes van tras la nube?
    • ¿Qué es un Red Team?
      • Assume breach
    • ¿Qué es un Pentesting?
      • Diferencias entre un pentest tradicional y un pentest cloud
    • Instalacion de Kali Linux en local
    • Crea tu cuenta de AWS
    • MITRE
    • Tecnicas de OSINT en AWS
      • Herramientas y Estrategias de OSINT
  • Introduccion a AWS
    • Accediendo a los servicios de AWS
    • ¿Que es AWS CLI?
      • Estructura de comandos en el CLI de AWS
    • El whoami de AWS
    • Almacenamiento de credenciales en archivo plano
      • Prefijo de ID con IAM
    • Incidentes de seguridad relacionados a AWS
    • Limitaciones en un pentest dentro de AWS
  • Introduccion a IAM
    • Tu primer Red Team contra AWS
    • ¿Que es Identity and Access Management o IAM?
    • Politica de IAM
      • La importancia de las politicas de IAM en la seguridad de AWS
      • Politicas predefinidas
    • Usuario de IAM
    • Grupo de IAM
    • Rol de IAM
      • Casos de uso
    • ARN
  • Tecnicas de Enumeracion en IAM
    • ¿Que permisos debo solicitar para realizar las pruebas?
    • Enumeracion Manual con AWSCLI
      • Enumerando usuarios
      • Enumerando grupos
      • Enumerando roles
      • Enumerando politicas
    • Enumeracion automatizada por medio de fuerza bruta
      • Enumerate-IAM.py
      • CLIAM
      • IAMFinder
    • Analisis de vulnerabilidades con herramientas automatizadas
      • Utilizando Prowler
      • Utilizando Cloudsplaining
  • Escalacion de privilegios en IAM
    • ¿Que es la escalacion de privilegios basada en IAM?
    • Metodos para la escalacion de privilegios
    • Permisos de IAM en otros usuarios
      • CreateAccessKey
      • CreateLoginProfile
      • UpdateLoginProfile
      • AddUserToGroup
    • Permisos sobre politicas
      • CreatePolicyVersion
      • SetDefaultPolicyVersion
      • AttachUserPolicy
      • AttachGroupPolicy
      • AttachRolePolicy
      • PutUserPolicy
      • PutGroupPolicy
      • PutRolePolicy
    • La actualización de una AssumeRolePolicy
      • UpdateAssumeRolePolicy
    • Permiso IAM:PassRole*
  • Introduccion a S3
    • ¿Que es Simple Storage Service o S3?
    • Politica de buckets
    • El riesgo de un bucket configurado como publico
    • Enumeracion manual con AWSCLI
    • Identificando vulnerabilidades en S3
    • Backdorizando un Bucket S3 utilizando la politica del Bucket
    • Exfiltracion de datos utilizando la replicacion en S3
  • Introduccion a EC2
    • ¿Que es Elastic Compute Cloud o EC2?
    • Networking en EC2
    • Fundamentos ofensivos para el servicio de IMDSv1
      • ¿Porque utilizar IMDSv2?
    • Ejecuccion de comandos en EC2 utilizando User Data
    • Recuperacion de la contraseña de un EC2
    • AWS Security Token
  • Introduccion a VPC
    • ¿Que es Virtual Private Cloud o VPC?
    • Grupos de seguridad VS lista de control de acceso
    • Pivoting en AWS VPC
    • Realizando Pivoting sobre un EC2
  • Tecnicas ofensivas contra EC2
    • Enumeracion manual con AWSCLI
    • Vectores de escalacion de privilegios
      • CreateEC2WithExistingIP
      • PassExistingRoleToNewGlueDevEndpoint
      • Resolviendo iam_privesc_by_rollback de CloudGoat
    • Abusando del servicio de metadatos IMDSv1 por medio de un SSRF
    • Caso de estudio - Capital One
    • Despliegue de Kali Linux en AWS para operaciones ofensivas
      • Bypass Rate Limit con IP Rotator de BurpSuite
    • Exfiltracion de datos utilizando un Snapshots de EBS
    • Exfiltracion de datos utilizando un Snapshots de una AMI
  • Introduccion a Lambda
    • ¿Que es un Lambda?
    • Desarrollo Serverless con Lambda
    • Arquitectura Monolítica vs Arquitectura Serverless
    • Damn Vulnerable Serverless Application
  • Tecnicas ofensivas contra Lambda
    • Enumeracion manual con AWSCLI
    • Remote Code Execution en Lambda
    • Vectores de escalacion de privilegios
      • PassExistingRoleToNewLambdaThenInvoke
      • PassRoleToNewLambdaThenTriggerWithNewDynamo
      • EditExistingLambdaFunctionWithRole
    • Resolviendo lambda_privesc de CloudGoat
    • Secuestro de Credenciales IAM y Datos de Eventos en AWS Lambda
  • Introduccion a API Gateway
    • ¿Que es API Gateway?
    • Vulnerabilidades Potenciales en API Gateway
    • Enumeracion manual con AWSCLI
    • Divulgacion de informacion sensible por medio de un mal manejo de errores
  • Introduccion a Cognito
    • ¿Que es Cognito?
    • Enumeracion manual con AWSCLI
    • Fundamentos de Lambda Autorizadora
    • Falta de Verificación de la Firma del JWT
    • Vulnerable Cognito
    • Tecnicas y tacticas ofensivas en Cognito
      • cognito-identity:SetIdentityPoolRoles + iam:PassRole
      • cognito-identity:update-identity-pool
      • cognito-idp:AdminAddUserToGroup
      • [cognito-idp:CreateGroup + cognito-idp:UpdateGroup], iam:PassRole
      • cognito-idp:AdminConfirmSignUp
      • cognito-idp:AdminCreateUser
      • cognito-idp:AdminEnableUser
      • cognito-idp:AdminSetUserPassword
      • AdminSetUserSettings | SetUserMFAPreference | SetUserPoolMfaConfig | UpdateUserPool
      • cognito-idp:AdminUpdateUserAttributes
      • cognito-idp:CreateUserPoolClient | cognito-idp:UpdateUserPoolClient
      • cognito-idp:CreateUserImportJob | cognito-idp:StartUserImportJob
      • cognito-idp:CreateIdentityProvider | cognito-idp:UpdateIdentityProvider
  • Introduccion a Lightsail
    • ¿Que es Lightsail?
    • Vulnerabilidades Potenciales en Lightsail
    • Wordpress Vulnerable
  • Introduccion a DynamoDB
    • ¿Que es DynamoDB?
    • Enumeracion manual con AWSCLI
    • Vulnerabilidades Potenciales en DynamoDB
  • Introduccion a RDS
    • ¿Que es RDS?
    • Vulnerabilidades Potenciales en RDS
    • Cambiando contraseña para un RDS
    • Remote Code Execution sobre un EC2 para comprometer una BD alojada en RDS
    • Exfiltracion de un RDS por medio de un snapshot
  • Introduccion a ECS - EKS - ECR
    • Introducción a los Contenedores y la Orquestación
    • ¿Que es ECS, EKS, ECR?
    • Vulnerabilidades Potenciales en ECS
    • Cluster Hijacking
    • Cloud Container Attack Tool - (CCAT)
    • Enumeracion manual con AWSCLI
  • Tecnicas ofensivas contra arquitectos de AWS
    • AWS SSO Phishing
    • Phishing sobre Login de AWS con Bypass de MFA
    • Gaining AWS Console Access via API Keys - aws_consoler
    • Leaked Credentials
    • Using Modern Malware
  • Introduccion a Secrets Manager
    • ¿Que es AWS Secrets Manager?
    • Enumeración manual de aws secrets manager
  • Movimiento lateral Cloud to Cloud
    • Fundamentos del movimiento lateral en Cloud
    • Técnica 1: Creación de Snapshot de EBS
    • Técnica 2: EC2 Instance Connect
    • Técnica 3: Serial Console Access
    • Technique 4: AWS: Systems Manager
  • Pivoting en AWS Organizations
    • Las cuentas de AWS como límite de seguridad
    • AWS Organizations
    • Abusando de las relaciones de confianza al crear un cuenta (OrganizationAccountAccessRole)
    • Trusted Access and Delegated Administration
    • Realizando un pivoting habilitando IAM Access Analyzer por medio de Trusted Access
  • Material Extra
    • Laboratorios desplegables para practicar hacking en AWS
    • Explotacion de CVEs en la nube - (Log4Shell)
    • PassExistingRoleToCloudFormation
    • PassExistingRoleToNewDataPipeline
    • Utilizando Cartography
    • Utilizando PACU
  • Fundamentos del Blue Team en AWS
    • Introducción a Blue Team en AWS
    • Amazon Cloudtrail
      • Apagando esta defensa
    • Amazon CloudWatch
    • Amazon GuardDuty
      • Apagando esta defensa
    • Amazon Detective
    • Amazon Security Hub
      • ¿Como se habilita?
    • Amazon Inspector
    • Amazon WAF
  • Muchas gracias
    • 🛡️ ¡Muchísimas Gracias por Participar! 🛡️
    • Importante
Con tecnología de GitBook
En esta página

¿Te fue útil?

  1. Introduccion a Cognito

Enumeracion manual con AWSCLI

gerh@spartan# aws cognito-idp list-user-pools --max-results 60 --profile cpna.student
{
    "UserPools": [
        {
            "Id": "us-east-1_vEo9e3Lk0",
            "Name": "poolcpna1",
            "LambdaConfig": {},
            "LastModifiedDate": "2024-06-01T21:28:13.550000-05:00",
            "CreationDate": "2024-06-01T21:28:13.550000-05:00"
        }
    ]
}
gerh@spartan# aws cognito-idp describe-user-pool --user-pool-id us-east-1_vEo9e3Lk0 --profile cpna.student
{
    "UserPool": {
        "Id": "us-east-1_vEo9e3Lk0",
        "Name": "poolcpna1",
        "Policies": {
            "PasswordPolicy": {
                "MinimumLength": 8,
                "RequireUppercase": true,
                "RequireLowercase": true,
                "RequireNumbers": true,
                "RequireSymbols": true,
                "TemporaryPasswordValidityDays": 7
            }
        },
        "DeletionProtection": "INACTIVE",
        "LambdaConfig": {},
        "LastModifiedDate": "2024-06-01T21:28:13.550000-05:00",
        "CreationDate": "2024-06-01T21:28:13.550000-05:00",
        "SchemaAttributes": [
            {
                "Name": "profile",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "address",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "birthdate",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "10",
                    "MaxLength": "10"
                }
            },
            {
                "Name": "gender",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "preferred_username",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "updated_at",
                "AttributeDataType": "Number",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "NumberAttributeConstraints": {
                    "MinValue": "0"
                }
            },
            {
                "Name": "website",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "picture",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "identities",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {}
            },
            {
                "Name": "sub",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": false,
                "Required": true,
                "StringAttributeConstraints": {
                    "MinLength": "1",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "phone_number",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "phone_number_verified",
                "AttributeDataType": "Boolean",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false
            },
            {
                "Name": "zoneinfo",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "locale",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "email",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "email_verified",
                "AttributeDataType": "Boolean",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false
            },
            {
                "Name": "given_name",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "family_name",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "middle_name",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "name",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            },
            {
                "Name": "nickname",
                "AttributeDataType": "String",
                "DeveloperOnlyAttribute": false,
                "Mutable": true,
                "Required": false,
                "StringAttributeConstraints": {
                    "MinLength": "0",
                    "MaxLength": "2048"
                }
            }
        ],
        "VerificationMessageTemplate": {
            "DefaultEmailOption": "CONFIRM_WITH_CODE"
        },
        "UserAttributeUpdateSettings": {
            "AttributesRequireVerificationBeforeUpdate": []
        },
        "MfaConfiguration": "OFF",
        "EstimatedNumberOfUsers": 1,
        "EmailConfiguration": {
            "EmailSendingAccount": "COGNITO_DEFAULT"
        },
        "UserPoolTags": {},
        "AdminCreateUserConfig": {
            "AllowAdminCreateUserOnly": false,
            "UnusedAccountValidityDays": 7
        },
        "Arn": "arn:aws:cognito-idp:us-east-1:583318501385:userpool/us-east-1_vEo9e3Lk0",
        "AccountRecoverySetting": {
            "RecoveryMechanisms": [
                {
                    "Priority": 1,
                    "Name": "verified_email"
                },
                {
                    "Priority": 2,
                    "Name": "verified_phone_number"
                }
            ]
        }
    }
}
gerh@spartan# aws cognito-idp list-user-pool-clients --user-pool-id us-east-1_vEo9e3Lk0 --profile cpna.student
{
    "UserPoolClients": [
        {
            "ClientId": "4llm1481f97qpr9ad4uv0rpn7e",
            "UserPoolId": "us-east-1_vEo9e3Lk0",
            "ClientName": "client"
        }
    ]
}
gerh@spartan# aws cognito-idp describe-user-pool-client --user-pool-id us-east-1_vEo9e3Lk0 --client-id 4llm1481f97qpr9ad4uv0rpn7e --profile cpna.student
{
    "UserPoolClient": {
        "UserPoolId": "us-east-1_vEo9e3Lk0",
        "ClientName": "client",
        "ClientId": "4llm1481f97qpr9ad4uv0rpn7e",
        "LastModifiedDate": "2024-06-01T21:28:14.241000-05:00",
        "CreationDate": "2024-06-01T21:28:14.241000-05:00",
        "RefreshTokenValidity": 30,
        "TokenValidityUnits": {},
        "ExplicitAuthFlows": [
            "ADMIN_NO_SRP_AUTH",
            "USER_PASSWORD_AUTH"
        ],
        "SupportedIdentityProviders": [
            "COGNITO"
        ],
        "CallbackURLs": [
            "https://spartancybersec-api.com/callback"
        ],
        "LogoutURLs": [
            "https://spartancybersec-api.com/logout"
        ],
        "AllowedOAuthFlows": [
            "code",
            "implicit"
        ],
        "AllowedOAuthScopes": [
            "aws.cognito.signin.user.admin",
            "email",
            "openid",
            "profile"
        ],
        "AllowedOAuthFlowsUserPoolClient": true,
        "EnableTokenRevocation": true,
        "EnablePropagateAdditionalUserContextData": false,
        "AuthSessionValidity": 3
    }
}
gerh@spartan# aws cognito-idp list-users --user-pool-id us-east-1_vEo9e3Lk0 --profile cpna.student
{
    "Users": [
        {
            "Username": "spartan.cpna",
            "Attributes": [
                {
                    "Name": "sub",
                    "Value": "b4283478-4001-70df-2710-a1d4047a1fff"
                }
            ],
            "UserCreateDate": "2024-06-01T21:28:14.368000-05:00",
            "UserLastModifiedDate": "2024-06-01T21:28:14.702000-05:00",
            "Enabled": true,
            "UserStatus": "CONFIRMED"
        }
    ]
}
Anterior¿Que es Cognito?SiguienteFundamentos de Lambda Autorizadora

Última actualización hace 11 meses

¿Te fue útil?