Hack Forums
[.NET] Flo (Cryptography, Image Encoding, Unique Identification) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Flo (Cryptography, Image Encoding, Unique Identification) (/showthread.php?tid=1239121)

Pages: Pages 1 2 3 4


Flo (Cryptography, Image Encoding, Unique Identification) - tflo - Apr 23, 2011

Recent Update(s):
  • 5 July 2011 - MOAR DYNAMIC! No overflow errors (thanks to @d3c0mpil3r).



Features:

[Image: 326d07a5b5ea6b3858efb2ff7412a463.png]
  • Unique Identification, faster then HWID (credits to @UbbeLoL)

  • Dynamic Cryptography

  • Dynamic Image Encoding



Source: C# | Basic



* - Deceptive - Apr 23, 2011

Thank you for this share.


* - memesbro - Apr 23, 2011

Is there anything unique about this compared to other ciphers?


* - Vysse - Apr 23, 2011

lmao you scared the shit out of me for a second there man...


* - c6p0 - Apr 23, 2011

thanks man i try this =)

+rep for you

vb.net
Code
Public Class VCryptography

  Private rand As System.Random
  Private Const DELIMETER As String = "-"

  Public Sub New(Optional ByVal seed As Integer = -1)
    rand = New System.Random(If((seed < 0), System.DateTime.Now.Millisecond, seed))
  End Sub

  Private Function calcOffset(ByVal offset As Integer()) As Integer
    Return (offset(0) * offset(1)) + (offset(2) * offset(3))
  End Function

  Private Function getOffset(ByVal raw As String) As Integer()
    Return New Integer() {Integer.Parse(raw.Substring(0, 1)), Integer.Parse(raw.Substring(1, 1)), Integer.Parse(raw.Substring(raw.Length - 2, 1)), Integer.Parse(raw.Substring(raw.Length - 1, 1))}
  End Function

  Private Function getNewOffset() As Integer()
    Return New Integer() {rand.[Next](8) + 2, rand.[Next](8) + 2, rand.[Next](8) + 2, rand.[Next](8) + 2}
  End Function

  Private Function removeOffset(ByVal raw As String) As String
    Return raw.Substring(2).Substring(0, raw.Length - 4)
  End Function

  Public Function encrypt(ByVal input As String) As String
    Dim offset As Integer() = getNewOffset()
    Dim shift As Integer = calcOffset(offset)
    Dim output As String = offset(0) & "" & offset(1)
    For Each c As Char In input
    output += (AscW(c) + shift) & DELIMETER
    Next
    Return output & offset(2) & offset(3)
  End Function

  Public Function decrypt(ByVal input As String) As String
    Dim offset As Integer() = getOffset(input)
    Dim shift As Integer = -1 * calcOffset(offset)
    Dim output As String = ""
    For Each s As String In removeOffset(input).Split(DELIMETER.ToCharArray(), System.StringSplitOptions.RemoveEmptyEntries)
    output += ChrW(Integer.Parse(s) + shift)
    Next
    Return output
  End Function
    End Class



* - tflo - Apr 23, 2011

(Apr 23, 2011 07:56 PM)Vysse Wrote:  lmao you scared the shit out of me for a second there man...

Lmao I was wondering what you were talking about then I noticed your sig.

@Everyone Else - Thanks for replies and the thread rating!


* - soft2050 - Apr 23, 2011

Looks Nice
Thanks mate

Add Usage for vb.ne too:

Code
Dim v As New VCryptography
  MessageBox.Show(v.encrypt("test"))

Also, you should show a screenshot of encrypted string:
[img]http://screensnapr.com/e/iTO9Wa.png[/img]


* - Vysse - Apr 23, 2011

(Apr 23, 2011 08:13 PM)Vanquish Wrote:  Lmao I was wondering what you were talking about then I noticed your sig.

@Everyone Else - Thanks for replies and the thread rating!

Haha ya so anyways nice trick your using there... itd be cool if you could somehow make it polymorphic...


* - Infinitus - Apr 23, 2011

(Apr 23, 2011 09:53 PM)Vysse Wrote:  Haha ya so anyways nice trick your using there... itd be cool if you could somehow make it polymorphic...

Working on it:P I'll post back if I have any luck

EDIT:
I guess you could just do this:

" rand = New System.Random(If((seed < 0), System.DateTime.Now.Millisecond / RandomNumber(900), seed)) "

Add a function to divide the system time by a random number so each output will be different but it will all decrypt the same, but I'm not sure if you would consider that polymorphic, just my two cents though.



* - tflo - Apr 24, 2011

Updated, the new code makes it a lot easier to customize the algorithm.

By default, the output is polymorphic (I think).


* - Deceptive - Apr 24, 2011

Might use this in the future :P


* - eXero - Apr 24, 2011

Thanks for this!! I think I will be using it.


* - .CRz - Apr 24, 2011

Thanks, Using This Algorithm on my Private Crypter.

Thanks Alot

Greetings to all HF ;)

hmm, just one question, maybe stupid...

is possible use v.encrypt(IO.File.ReadAllBytes(InfectedFile))

for do that the function of the VCrypt needs to bee something like Public Function encrypt(ByVal input As Byte())

the only thing changed is the String to Byte, but if edit it will get errors as obvious...

Vanquish You can do something?




* - tflo - Apr 24, 2011

Thanks guys, added byte encryption.

-- Not sure if I did byte encryption the right way, someone inform me if it is properly done.


* - Crash-Override - Apr 25, 2011

@ OP will it support all character set ?