Exploit database

GH-88d8bc551618926a04536090300b4292

dungnm24/cve-2020-0796

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2020-0796

81 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files41

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

WindowsProtocolTestSuites/TestSuites/MS-ADOD/Setup/Scripts/JoinDomainCreateAcctLDAP.sh

Shell · 1,190 bytes
#!/bin/sh
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.

##############################################################################
#
#  File:     JoinDomainCreateAcctLDAP.sh
#  Purpose:  To trigger the machine join domain by creating an account using LDAP.
##############################################################################

# Check the argument number
if [ $# -ne 3 ]; then
{
cat<<HELP
JoinDomainCreateAcctLDAP -- To trigger the client join domain by creating an account using LDAP.

USAGE: JoinDomainCreateAcctLDAP fulldomainname username password
HELP
echo false
exit 1
}
fi

# Get the parameters
fulldomainname=$1
username=$2
password=$3

# Trigger the client to join domain
cd /usr/local/samba-master/bin
msg=`samba-tool domain join $fulldomainname MEMBER -U$username%$password --realm=$fulldomainname`
echo $msg
result=`echo $msg|grep -l "Joined domain"|wc -l`

# If result contains Joined domain ..., it indicates that the joining domain is successful
if [ $result -ne 0 ]; then
{
echo true
exit 0
}
else
{
echo "Not joined to any domain."
echo false
exit 1
}
fi