Insertar valores en una tabla de una base de datos en MySQL con PowerShell

Almacenar la información enviada entre un cliente y un servidor en una base de datos MySQL con PowerShell



Ver los valores insertados en la tabla de la base de datos

Crear una tabla en una base de datos en MySQL con PowerShell

Crear una base de datos en MySQL con PowerShell

Conectar PowerShell con MySQL


1.Descargar e instalar MySQL Server (

2. Descargar e instalar MySQL Connector Net (

3. Utilizar el conector desde PowerShell (la base de datos y las tablas tienen que existir para poder obtener datos al ejecutar una consulta)

Windows Post Exploitation Cmdlets Execution (PowerShell)


This section focuses on information gathering about the victim host and the network that it’s attached to.







Finding important files

Files to pull

Remote system access


Auto­Start directories


This section focuses on gaining a foothold to re­gain, or re­obtain access to a system through means of authentication, backdoors, etc..


Compress or expand ZIP archive

Reg command exit

Deleting logs

Uninstalling software „Antivirus“

Invasive or altering commands

ADB Shell Commands

The Android Debug Bridge (adb) provides a Unix shell that you can use to run a variety of commands on an emulator or connected device.


ADB Shell Commands


Issuing Shell Commands

You can use the shell command to issue commands, with or without entering the adb remote shell on the emulator/device. To issue a single command without entering a remote shell, use the shell command like this:


List of all attached device


Download a specified file from an device to your computer


Upload a specified file from your computer to an device


List directory contents


Change directory


Remove files or directories


Make directories


Create empty file


Current working directory location


Copy files and directories


Move or rename files


Starts (restarts) an emulator/device instance


Stops execution of an emulator/device instance


Prints kernel debugging messages to the screen


Show/manipulate routing, devices, policy routing and tunnels


Network statistics


Network connection tool


Test the connection and latency between two network connection


Using activity manager (am)

Activity manager (am) tool to perform various system actions, such as start an activity, force-stop a process, broadcast an intent, modify the device screen properties, and more. While in a shell, the syntax is:

Available activity manager commands:

Start an Activity specified by <INTENT>.

Start the Service specified by <INTENT>.

Kill all processes associated with <PACKAGE>


Using package manager (pm)

Within an adb shell, you can issue commands with the package manager (pm) tool to perform actions and queries on application packages installed on the device. While in a shell, the syntax is:

Available activity manager commands:

Prints all packages, optionally only those whose package name contains the text in <FILTER>.

Prints all known permission groups

Prints all known permissions, optionally only those in <GROUP>

Prints all features of the system

Prints all users on the system

Installs a package (specified by <PATH>) to the system


Taking a device screenshot

The screencap command is a shell utility for taking a screenshot of a device display. While in a shell, the syntax is:


Recording a device screen

The screenrecord command is a shell utility for recording the display of devices running Android 4.4 (API level 19) and higher. The utility records screen activity to an MPEG-4 file.


List of all the available shell programs


More commands


Crear una tarea programada que se encarga de enviar un mail a una hora en concreto si se encuentra un valor en una tabla de MySQL

En primer lugar, crear el script que se conecta a una base de datos de MySQL y hace una consulta para ver si existe un elemento dentro de una tabla, si existe se encarga de enviar un mail

En segundo lugar crear una tarea programada que llama al script

Insert into MySQL database

Select into MySQL database