tis-laps-by-wapt icon

LAPS by WAPT

Silent install package for LAPS by WAPT

3-13
Utilities
Utilities

tis-laps-by-wapt

This guide explains how to retrieve the local administrator password generated by the tis-laps-by-wapt package.


Instructions

Steps to Retrieve the Password

  1. Deploy the Package Install the tis-laps-by-wapt package on:

    • The target Organizational Unit (OU), or
    • The individual machines concerned.
  2. Access Audit Data

    • In the WAPT Console, select a machine where the tis-laps-by-wapt package is installed.
    • In the right panel, navigate to the « Audit Data » tab.
  3. Locate the LAPS Section

    • Find the row where the « Section » column contains the value « laps ».
  4. Identify the Password Key

    • The associated key is named « local_admin_password ».
    • If the « Decrypt Data » option is not checked, the displayed value will be encrypted in the following format:
      -----BEGIN WAPT ENCRYPTION-----
      {"XXXXXX"}
      -----END WAPT ENCRYPTION-----
      
  5. Decrypt the Value

    • Check the « Decrypt Data » option to display the password in plaintext.
    • Condition: Your WAPT certificate must be correctly configured on the machine for decryption to work.

Important Notes

  • Decryption requires the WAPT certificate to be present and valid on the machine.
  • If the certificate is missing or invalid, the value will remain encrypted.

  • package: tis-laps-by-wapt
  • name: LAPS by WAPT
  • version: 3-13
  • categories: Utilities
  • maintainer: WAPT Team,Tranquil IT,Simon FONTENEAU,Amelie LE JEUNE,Pierre COSSON,Jimmy PELÉ
  • licence: wapt_public
  • locale: all
  • target_os: windows
  • architecture: all
  • signature_date:
  • size: 60.74 Ko

package           : tis-laps-by-wapt
version           : 3-13
architecture      : all
section           : base
priority          : optional
name              : LAPS by WAPT
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Simon FONTENEAU,Amelie LE JEUNE,Pierre COSSON,Jimmy PELÉ
description       : change and display administrator password with admin's private key
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.1
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : wapt_public
homepage          : 
package_uuid      : 04b510ae-7ec9-498b-878a-b1af174c51ac
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 3ff6547ef5ca3bd871b4ae07f6ae9060009646db2baac829120c87c285ead18b
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2026-10-06T01:27:14.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : DfWo/VsYoTi4SOvN8nsXSKHwhGVX8SBFcY0Z5P23atoImZqNS6wdPRpBm+yOgdfDohX6GRNWpkUl4sY3Wi6jJmcSeTbvwxXfWG8hCeCl9vFJ5/dftEfvTAjnOo1lokz/kQhmbQQGlgtEbFGNznIqgGZFsQjHOckVbxlHLXaQGclxeeHHZZxoaoYLznSw4OXg9DIci0QBUXKQeeu7k37xVCizsuPHWs+2PFug9ZCN/O/I87fAJLdsnTQGx3cJl15sQkjmTuYxzIY6eZvl2W/LZtUpFXiRTUzpcD+ZIpMnxao7kI1L47VVJPJ6l773Rchnfm0dJz474y8t1qsEwl1Ilg==

# -*- coding: utf-8 -*-
from setuphelpers import *
import win32net
import win32security
import datetime

try:
    import waptcrypto

    if "encrypted_data_str" in dir(waptcrypto):
        from waptcrypto import encrypted_data_str as rsa_encrypted_data_str
except:
    pass

import secrets


# dict_admin = {
#     "en": "administrator",
#     "fr": "administrateur",
#     "de": "administrator",
#     "pl": "administrator",
#     "es": "Administrador",
#     "pt": "administrador",
#     "it": "administrator",
#     "nl": "administrator",
#     "ru": "Администратор",
# }


def install():
    # you can add you ssl certificate in the package in order to decrypt information in the audit_data
    for crt in glob.glob("*.crt"):
        filecopyto(crt, makepath(WAPT.wapt_base_dir, "ssl", crt))
    filecopyto("eff_large_wordlist.txt",persistent_dir)
    audit()


def audit():
    all_passwords = list(WAPT.read_audit_data_set("laps", "local_admin_password"))
    if all_passwords:
        last_date = list(WAPT.read_audit_data_set("laps", "local_admin_password"))[-1][1]
    else:
        last_date = None
    if not last_date or (datetime.datetime.now(datetime.timezone.utc) - isodate2datetime(last_date) > datetime.timedelta(days=365)) or force:
        with open(makepath(persistent_dir,"eff_large_wordlist.txt")) as f:
            words = [line.split("\t")[1].strip() for line in f]
        passphrase = generate_passphrase(words)
        locsid = str(win32net.NetUserModalsGet(get_computername(), 2)['domain_id']).split(':',1)[-1]
        sid = win32security.GetBinarySid(locsid + "-500")
        admin_local_user, domain, typ = win32security.LookupAccountSid(wincomputername(), sid)

        if not params.get("install_with_luti", False):
            run(r'net user "%s" "%s"' % (admin_local_user, passphrase))

        run(r'net user "%s" /active:yes' % admin_local_user)
        WAPT.write_audit_data_if_changed("laps", "local_admin_password", rsa_encrypted_data_str(passphrase, [WAPT.public_certs_dir]), max_count=3)
    return "OK"

def generate_passphrase(word_list, num_words=4):

    parts = [secrets.choice(word_list).capitalize() + str(secrets.randbelow(10)) for _ in range(num_words)]
    return "-".join(parts)

1a6b620f00f4030e18b8bf199de1987bae82e8b57541750886298ac42393ddc6 : WAPT/README.md
424412f5866d0050bf46967f2f3aefedbf1de50d6821f719b20fcc4e5d85e214 : WAPT/README_fr.md
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
3aae7ba04cfa4e9c1df7c08ca5d79b3faf6cd954af9fb2dce27e673dd6354aa0 : WAPT/control
3ff6547ef5ca3bd871b4ae07f6ae9060009646db2baac829120c87c285ead18b : WAPT/icon.png
ce144bbfd1dbaa823492d7df1f0c50c18eb89ce68008277b60fe28f199de0234 : eff_large_wordlist.txt
7b2fdd72e691ffdabc3015ea0f203a774fb5e90bc13ccdc02b690ec38a66c37d : luti.json
912876e18bf6ad88698d9ba3efa12f3f44741c78273c5b2b23d84526c74f815e : setup.py