Reverse Engineering RET Homepage RET Members Reverse Engineering Projects Reverse Engineering Papers Reversing Challenges Reverser Tools RET Re-Search Engine Reverse Engineering Forum Reverse Engineering Links

Go Back   Reverse Engineering Team Board > Reverse Engineering Board > .NET Reverse Engineering
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-26-2016, 04:44 AM
resac resac is offline
Member
 
Join Date: Jun 2011
Posts: 41
Default Senitel dongle protected Application, need to decode the strings inside application f

Hi All.
below is the code where application generates Licence Key. anyone help me to generate key for this,


Code:
private void FormLic_Load(object sender, EventArgs e)
{
    string str = "";
    GClass0.smethod_4("1600000002C2F72CCB4998405A394209591F25A0DB235D533C6C4225E94EBF5A92D42E5B0A");
    string str3 = "";
    string salt = GClass0.smethod_4("5E0000000487759748EA30E819DA0B99542D8E87CF8904511F6015AE536164A9808F5460352E3B3938881EECAAFECCC45CEA990F439E9AB2F3A7B3BCA6E9C07EF325E63F971B0AF2A28EA8E154B2B044B38410D998F3EA1263631880900E1E5EBF19B9D837") + this.LabelSerialno.Text;
    string path = GClass0.smethod_4("2400000004B2B044B38410D998F3EA12636318809023297FB66EE2F024F7687DDB51727AEAFF948C969BFFC44A93D723F6580D9FC0");
    string str6 = "";
    if (File.Exists(path))
    {
        try
        {
            foreach (XElement element2 in XDocument.Load(path).Root.Elements())
            {
                if (element2.Name == GClass0.smethod_4("0E00000001A0CE016953F721EE02D9A031F6DEC3C9"))
                {
                    str3 = RijndaelManagedEncryption.RijndaelManagedEncryption.DecryptRijndael(element2.Value, salt);
                    this.TxtKey1.Text = str3;
                }
                if (element2.Name == GClass0.smethod_4("1200000002ADBBDABB30997F9924025036AB6AA05AB9D33BE83EFD023A25483DEFB74DBA46"))
                {
                    str = RijndaelManagedEncryption.RijndaelManagedEncryption.DecryptRijndael(element2.Value, salt);
                    this.TxtKey2.Text = str;
                }
                if (element2.Name == GClass0.smethod_4("0C00000003212FCFB92AFA64F83B99A10C996A3B97"))
                {
                    str6 = RijndaelManagedEncryption.RijndaelManagedEncryption.DecryptRijndael(element2.Value, salt);
                    this.TxtKey3.Text = str6;
                }
            }
        }
        catch
        {
        }
    }
}




private void BrowseLic_Click(object sender, EventArgs e)
{
    OpenFileDialog dialog = new OpenFileDialog {
        Filter = GClass0.smethod_4("1200000003AD868D3300D6DEFE1687278BE054E8650622D7BB4172348F1568AA05AA37F670"),
        Multiselect = (bool) GClass0.smethod_5("0184915E1EB04681446C44741AF4B20254")
    };
    if (dialog.ShowDialog() == GClass0.smethod_5("02C3B9EF619FE76CCE7647C51A0327F099"))
    {
        GClass0.smethod_4("16000000019371554DCD35DFA5E1AA6BE196C971DA84092DFB36B42581C41DAF172E2713CC");
        string salt = GClass0.smethod_4("5E0000000487759748EA30E819DA0B99542D8E87CF8904511F6015AE536164A9808F5460352E3B3938881EECAAFECCC45CEA990F439E9AB2F3A7B3BCA6E9C07EF325E63F971B0AF2A28EA8E154B2B044B38410D998F3EA1263631880902C1562F846568564") + this.LabelSerialno.Text;
        string fileName = dialog.FileName;
        if (File.Exists(fileName))
        {
            this.BtnActivateLic.Visible = (bool) GClass0.smethod_5("049922DCDA8D32E815D98F6E510F024D3B");
            try
            {
                foreach (XElement element2 in XDocument.Load(fileName).Root.Elements())
                {
                    if (element2.Name == GClass0.smethod_4("0E00000004ED637C6B2265C1176CEC3A8B030B36BE"))
                    {
                        RijndaelManagedEncryption.RijndaelManagedEncryption.DecryptRijndael(element2.Value, salt);
                        this.TxtKey1.Text = element2.Value;
                    }
                    if (element2.Name == GClass0.smethod_4("1200000004FD02EFD56C8BA6B69C0B5DB5E7C4DE3421F82D02F7590E50F43CD90953407B8D"))
                    {
                        RijndaelManagedEncryption.RijndaelManagedEncryption.DecryptRijndael(element2.Value, salt);
                        this.TxtKey2.Text = element2.Value;
                    }
                    if (element2.Name == GClass0.smethod_4("0C0000000441827ABB06ACDAAB98B301CDB58E487A"))
                    {
                        RijndaelManagedEncryption.RijndaelManagedEncryption.DecryptRijndael(element2.Value, salt);
                        this.TxtKey3.Text = element2.Value;
                    }
                }
            }
            catch
            {
                MessageBox.Show(GClass0.smethod_4("20000000014FA96E595CA7D6583B1CA8D328F0AE04C435218779591C121B55707D288F932A"), "License Error", (MessageBoxButtons) GClass0.smethod_5("014A6E88A3CF637EEF66586E8665EFC772"), (MessageBoxIcon) GClass0.smethod_5("01338B607D039B512EC847DD26795B4950"));
                Application.Exit();
            }
        }
    }
}

private void BtnActivateLic_Click(object sender, EventArgs e)
{
    XmlWriter writer = XmlWriter.Create(Application.StartupPath + GClass0.smethod_4("260000000246B0B48D91CD6F2B2F2C5AADED8DE2A374358EDA32BACB6EB0FCE9CD0142A7815327F6C183DC132A3BA19F5B5ECED7C4"));
    writer.WriteStartDocument();
    writer.WriteStartElement(GClass0.smethod_4("0E00000001C435218779591C122BDABE9D8BDBEB33"));
    writer.WriteElementString(GClass0.smethod_4("0E000000032D0B713F7419CF108BB812700A47E6B7"), this.TxtKey1.Text);
    writer.WriteElementString(GClass0.smethod_4("120000000306CD182D072A0306A90BF1F1C555ED36EDCD896B7C4932229E35BAEF8741E86C"), this.TxtKey2.Text);
    writer.WriteElementString(GClass0.smethod_4("0C000000013B853C5A55203833CEB031E1CE5E9017"), this.TxtKey3.Text);
    writer.WriteEndElement();
    writer.WriteEndDocument();
    writer.Flush();
    writer.Close();
}


private static string smethod_0() => 
    "28ADC496D3BCB045";



private static uint smethod_1(char char_0)
{
    if (('0' <= char_0) && (char_0 <= '9'))
    {
        return (uint) (char_0 - '0');
    }
    if (('A' <= char_0) && (char_0 <= 'F'))
    {
        return (uint) ((char_0 - 'A') + 10);
    }
    return 0;
}



public static string smethod_2()
{
    byte[] buffer = new byte[0x420];
    if (0 == GClass2.SDNPro_3(smethod_0(), buffer))
    {
        return Encoding.UTF8.GetString(buffer);
    }
    return null;
}



public static string smethod_3()
{
    StringBuilder builder = new StringBuilder(0x210);
    if (0 == GClass2.SDNPro_4(smethod_0(), builder))
    {
        return builder.ToString();
    }
    return null;
}



public static string smethod_4(string string_0)
{
    StringBuilder builder = new StringBuilder(string_0);
    uint num = GClass2.SDNPro_5(smethod_0(), builder);
    if (num != 0)
    {
        char[] chArray = new char[num / 4];
        for (int i = 0; i < (num / 4); i++)
        {
            chArray[i] = (char) (((smethod_1(builder[i * 4]) * 0x10) + smethod_1(builder[(i * 4) + 1])) + (((smethod_1(builder[(i * 4) + 2]) * 0x10) + smethod_1(builder[(i * 4) + 3])) * 0x100));
        }
        string str = new string(chArray);
        return string.Intern(str);
    }
    return string_0;
}

public static int smethod_5(string string_0)
{
    StringBuilder builder = new StringBuilder(string_0);
    return GClass2.SDNPro_6(smethod_0(), builder);
}

public static long smethod_6(string string_0)
{
    StringBuilder builder = new StringBuilder(string_0);
    ulong num = GClass2.SDNPro_7(smethod_0(), builder);
    uint num2 = ((((smethod_1(builder[0]) * 0x10) + smethod_1(builder[1])) + (((smethod_1(builder[2]) * 0x10) + smethod_1(builder[3])) * 0x100)) + ((((smethod_1(builder[4]) * 0x10) + smethod_1(builder[5])) * 0x100) * 0x100)) + (((((smethod_1(builder[6]) * 0x10) + smethod_1(builder[7])) * 0x100) * 0x100) * 0x100);
    num = ((((num * ((ulong) 0x100L)) * ((ulong) 0x100L)) * ((ulong) 0x100L)) * ((ulong) 0x100L)) + num2;
    return (long) num;
}





i just dumped the .Net exe to check methods. i have dongle emulator . need to generate License file


Thanks
Reply With Quote
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump





Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.