[.Net逆向] dnSpy 编辑方法、IL指令,求教
本帖最后由 wjbg2022 于 2024-6-13 18:05 编辑各位大佬。我有两个问题,如下:
1、有一个vb.net编译的dll文件,已去壳,去混淆,但是一但编辑方法,程序就报错,部分代码变红了(不能到编译那一步),请问是我脱壳或去混淆不干净吗?我该怎么做?谢谢!
2、通过查看代码,我找到了注册码的代码,我想通过修改IL指令,以至于输出注册码,代码是:
Dim correctActivationCode As String = Strings.Mid(Class20.smethod_16(Class20.smethod_16(Class11.MySettings_0.sx16, "15753578", "IoonIocn"), "15753578", "IoonIocn"), 12)
Interaction.MsgBox("激活码错误! 正确的激活码是: " & correctActivationCode, MsgBoxStyle.OkOnly, Nothing)
请问IL指令应该怎样写?
链接:https://pan.baidu.com/s/1kbSMqd33egvCS7Q_lMgQGQ?pwd=2x32
提取码:2x32
感谢各位大佬为我解答!
代码都出来了 逻辑很简单了啊 if部分直接改一样的就行了
' Token: 0x060005AB RID: 1451 RVA: 0x0004D770 File Offset: 0x0004B970
Private Sub method_2(sender As Object, e As EventArgs)
If Not(Operators.CompareString(Strings.Mid(Class9.smethod_16(Class9.smethod_16(MySettingsProperty.Settings.sx16, "15753578", "IconIcon"), "15753578", "IconIcon"), 1, 12), MySettingsProperty.Settings.sx17, False) = 0 And Operators.CompareString(MySettingsProperty.Settings.sx17, "", False) <> 0) Then
If Operators.CompareString(Strings.Mid(Class9.smethod_16(Class9.smethod_16(MySettingsProperty.Settings.sx16, "15753578", "IconIcon"), "15753578", "IconIcon"), 12), Me.TextBox2.Text, False) <> 0 Then
Interaction.MsgBox("激活成功!", MsgBoxStyle.OkOnly, Nothing)
MySettingsProperty.Settings.sx17 = Strings.Mid(Class9.smethod_16(Class9.smethod_16(MySettingsProperty.Settings.sx16, "15753578", "IconIcon"), "15753578", "IconIcon"), 1, 12)
MySettingsProperty.Settings.Save()
Else
Interaction.MsgBox("激活成功!", MsgBoxStyle.OkOnly, Nothing)
MySettingsProperty.Settings.sx17 = Strings.Mid(Class9.smethod_16(Class9.smethod_16(MySettingsProperty.Settings.sx16, "15753578", "IconIcon"), "15753578", "IconIcon"), 1, 12)
MySettingsProperty.Settings.Save()
End If
Else
Interaction.MsgBox("您已激活", MsgBoxStyle.OkOnly, Nothing)
End If
End Sub byh3025 发表于 2024-4-23 20:01
改IL代码后就可以保存了,还有,你怎么确定你截图的地方是判断会员的呢?代码中没有提示啊?
' Token: 0x06000340 RID: 832 RVA: 0x000323A8 File Offset: 0x000305A8
Public Sub 尺寸链标注Show()
If Class5.smethod_24("此功能属于VIP功能,需开通VIP后使用!") Then
Class7.object_1 = CType(Me.SwApp.ActiveDoc, ModelDoc2)
If Information.IsNothing(Class7.object_1) Then
Interaction.MsgBox("请在工程图环境中使用!", MsgBoxStyle.OkOnly, Nothing)
ElseIf CType(Class7.object_1, IModelDoc2).() <> 3 Then
Interaction.MsgBox("请在工程图环境中使用!", MsgBoxStyle.OkOnly, Nothing)
Else
Dim form As Form = Application.OpenForms.Cast().OfType().FirstOrDefault()
If form Is Nothing Then
Dim chiCunLianForm As ChiCunLianForm = New ChiCunLianForm()
chiCunLianForm.Show()
End If
End If
End If
End Sub
我是从这里点进去的
改IL代码逻辑 qq465881818 发表于 2024-4-23 19:13
改IL代码逻辑
你好,改IL有什么用?还没有学过,请问有相关文章分享吗?谢谢!
wjbg2022 发表于 2024-4-23 19:40
你好,改IL有什么用?还没有学过,请问有相关文章分享吗?谢谢!
改IL代码后就可以保存了,还有,你怎么确定你截图的地方是判断会员的呢?代码中没有提示啊? byh3025 发表于 2024-4-23 20:01
改IL代码后就可以保存了,还有,你怎么确定你截图的地方是判断会员的呢?代码中没有提示啊? ' Token: 0x060005AB RID: 1451 RVA: 0x0004D770 File Offset: 0x0004B970
Private Sub method_2(sender As Object, e As EventArgs)
If Not(Operators.CompareString(Strings.Mid(Class9.smethod_16(Class9.smethod_16(MySettingsProperty.Settings.sx16, "15753578", "IconIcon"), "15753578", "IconIcon"), 1, 12), MySettingsProperty.Settings.sx17, False) = 0 And Operators.CompareString(MySettingsProperty.Settings.sx17, "", False) <> 0) Then
If Operators.CompareString(Strings.Mid(Class9.smethod_16(Class9.smethod_16(MySettingsProperty.Settings.sx16, "15753578", "IconIcon"), "15753578", "IconIcon"), 12), Me.TextBox2.Text, False) <> 0 Then
Interaction.MsgBox("激活码错误!", MsgBoxStyle.OkOnly, Nothing)
Else
Interaction.MsgBox("激活成功!", MsgBoxStyle.OkOnly, Nothing)
MySettingsProperty.Settings.sx17 = Strings.Mid(Class9.smethod_16(Class9.smethod_16(MySettingsProperty.Settings.sx16, "15753578", "IconIcon"), "15753578", "IconIcon"), 1, 12)
MySettingsProperty.Settings.Save()
End If
Else
Interaction.MsgBox("您已激活", MsgBoxStyle.OkOnly, Nothing)
End If
End Sub
大佬!这一段是注册器的,太难了,故想直接从Class5.smethod_24入手,还在尝试中!大佬,请问我算是脱壳成功了? 一楼的图 修改IL代码 返回true 就OK了,也可以按6楼图所示写KG wjbg2022 发表于 2024-4-23 20:20
' Token: 0x060005AB RID: 1451 RVA: 0x0004D770 File Offset: 0x0004B970
...
能看到源码就可以了 反混淆这个如何处理? 好像并没有把混淆还原
页:
[1]
2