void RootingBypassInstall_buttonClick(object sender, EventArgs e) { if (selectedDevice == "") { MessageBox.Show("Device Select Plz...."); } else { System.Diagnostics.ProcessStartInfo proInfo = new System.Diagnostics.ProcessStartInfo(); System.Diagnostics.Process pro = new System.Diagnostics.Process(); proInfo.FileName = @"cmd"; proInfo.CreateNoWindow = true; proInfo.UseShellExecute = false; proInfo.RedirectStandardOutput = true; proInfo.RedirectStandardInput = true; proInfo.RedirectStandardError = true; pro.StartInfo = proInfo; pro.Start(); LoadingForm f = new LoadingForm(); f.Function = (() => { pro.StandardInput.Write(@"adb -s " + selectedDevice + " push ./Lib/rootingbypass /data/local/tmp/" + Environment.NewLine); pro.StandardInput.Write(@"adb -s " + selectedDevice + " push ./Lib/targetlist.dat /data/local/tmp/" + Environment.NewLine); pro.StandardInput.Write(@"adb -s " + selectedDevice + " shell su -c \"chmod 777 /data/local/tmp/rootingbypass\"" + Environment.NewLine); pro.StandardInput.Write(@"adb -s " + selectedDevice + " shell su -c \"chmod 777 /data/local/tmp/targetlist.dat\"" + Environment.NewLine); pro.StandardInput.Close(); pro.WaitForExit(); }); f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); pro.Close(); var engine = IronPython.Hosting.Python.CreateEngine(); var scope = engine.CreateScope(); var source = engine.CreateScriptSourceFromString(code, Microsoft.Scripting.SourceCodeKind.Statements); source.Execute(scope); var cmd_Python = scope.GetVariable <Func <string, string> >("CMD_python"); string cmd_RootingBypassFile_View = ""; string cmd_RootingBypassFile = ""; cmd_RootingBypassFile = "adb -s " + selectedDevice + " shell \"ls -al /data/local/tmp/ | grep rootingbypass\""; LoadingForm f2 = new LoadingForm(); f2.Function = (() => { cmd_RootingBypassFile_View = cmd_Python(cmd_RootingBypassFile); }); f2.StartPosition = FormStartPosition.CenterParent; f2.ShowDialog(); cmd_view.AppendText("-----------------------------------------------------\r\n"); cmd_view.AppendText(cmd_RootingBypassFile_View); cmd_view.AppendText("-----------------------------------------------------\r\n"); cmd_view.AppendText("[+] RootingBypass Install Complete\r\n"); } }
void FridaServerEXE_buttonClick(object sender, EventArgs e) { if (selectedDevice == "") { MessageBox.Show("Device Select Plz...."); } else { System.Diagnostics.ProcessStartInfo proInfo = new System.Diagnostics.ProcessStartInfo(); System.Diagnostics.Process pro = new System.Diagnostics.Process(); proInfo.FileName = @"cmd"; proInfo.CreateNoWindow = true; proInfo.UseShellExecute = false; proInfo.RedirectStandardOutput = true; proInfo.RedirectStandardInput = true; proInfo.RedirectStandardError = true; pro.StartInfo = proInfo; pro.Start(); LoadingForm f = new LoadingForm(); f.Function = (() => { if (Emulator_RadioButton.Checked) { pro.StandardInput.Write(@"adb -s " + selectedDevice + " shell /data/local/tmp/frida-server-android-x86 &" + Environment.NewLine); } else { pro.StandardInput.Write(@"adb -s " + selectedDevice + " shell su -c \"/data/local/tmp/frida-server-android-arm &\"" + Environment.NewLine); } pro.StandardInput.Close(); pro.WaitForExit(200); }); f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); pro.Close(); var engine = IronPython.Hosting.Python.CreateEngine(); var scope = engine.CreateScope(); var source = engine.CreateScriptSourceFromString(code, Microsoft.Scripting.SourceCodeKind.Statements); source.Execute(scope); var cmd_Python = scope.GetVariable <Func <string, string> >("CMD_python"); string cmd_FridaServerPS_View = ""; string cmd_FridaServerPS = "adb -s " + selectedDevice + " shell \"ps | grep frida-server-*\""; LoadingForm f2 = new LoadingForm(); f2.Function = (() => { cmd_FridaServerPS_View = cmd_Python(cmd_FridaServerPS); }); f2.StartPosition = FormStartPosition.CenterParent; f2.ShowDialog(); cmd_view.AppendText("-----------------------------------------------------\r\n"); cmd_view.AppendText(cmd_FridaServerPS_View); cmd_view.AppendText("-----------------------------------------------------\r\n"); cmd_view.AppendText("[+] FridaSever Start Complete\r\n"); } }
void DeviceList_Click(object sender, EventArgs e) { var engine = IronPython.Hosting.Python.CreateEngine(); var scope = engine.CreateScope(); var source = engine.CreateScriptSourceFromString(code, Microsoft.Scripting.SourceCodeKind.Statements); source.Execute(scope); var devicesList_python = scope.GetVariable <Func <object> >("DevicesList_python"); List devicesList = new List(); LoadingForm f = new LoadingForm(); f.Function = (() => { devicesList = (List)devicesList_python(); }); f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); List <string> devicesList_C = new List <string>(); devicesList_C.Clear(); foreach (string data in devicesList) { devicesList_C.Add(data); } DeviceView.Items.Clear(); string result = ""; result = devicesList_C.Find(item => item == "started"); if (result != null) { for (int i = 20; i < devicesList_C.Count; i = i + 2) { DeviceView.Items.Add("" + devicesList_C[i] + " , [" + devicesList_C[i + 1] + "]"); } } else { for (int i = 4; i < devicesList_C.Count; i = i + 2) { DeviceView.Items.Add("" + devicesList_C[i] + " , [" + devicesList_C[i + 1] + "]"); } } }
void Memory_Dump_ButtonClick(object sender, EventArgs e) { if (selectedProcessName == "") { MessageBox.Show("Process Select Plz...."); } else { System.Diagnostics.ProcessStartInfo proInfo = new System.Diagnostics.ProcessStartInfo(); System.Diagnostics.Process pro = new System.Diagnostics.Process(); proInfo.FileName = @"cmd"; proInfo.CreateNoWindow = true; proInfo.UseShellExecute = false; proInfo.RedirectStandardOutput = true; proInfo.RedirectStandardInput = true; proInfo.RedirectStandardError = true; pro.StartInfo.WorkingDirectory = filePath + @"/"; pro.StartInfo = proInfo; pro.Start(); string sDirPath; sDirPath = Application.StartupPath + "\\Dump\\Memory_Dump\\" + selectedProcessName; DirectoryInfo di = new DirectoryInfo(sDirPath); if (di.Exists == false) { di.Create(); } LoadingForm f = new LoadingForm(); f.Function = (() => { pro.StandardInput.Write(@".\\Lib\\fridump.py -u -s -o "".\\Dump\\Memory_Dump\\" + selectedProcessName + "\" " + selectedPID + "" + Environment.NewLine); pro.StandardInput.Close(); pro.WaitForExit(); }); f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); pro.Close(); cmd_view.AppendText("-----------------------------------------------------\r\n"); cmd_view.AppendText("[+] " + selectedProcessName + " Memory_Dump Complete\r\n"); } }
void Extract_Click(object sender, EventArgs e) { if (Image_View.Image != null) { Image_View.Image.Dispose(); } var engine = IronPython.Hosting.Python.CreateEngine(); var scope = engine.CreateScope(); var source = engine.CreateScriptSourceFromString(code, Microsoft.Scripting.SourceCodeKind.Statements); source.Execute(scope); var File_Image_Extract = scope.GetVariable <Func <string, string> >("File_Image_Extract"); var Directory_Image_Extract = scope.GetVariable <Func <string, string> >("Directory_Image_Extract"); var Output_Extract_delete = scope.GetVariable <Func <string> >("Output_Extract_delete"); if (selectedFileExtractName != "") { Output_Extract_delete(); LoadingForm f = new LoadingForm(); f.Function = (() => { File_Image_Extract(selectedFileExtractName); }); f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); ExtractImage_View_ListSave(); } else if (selectedFolderExtractName != "") { Output_Extract_delete(); LoadingForm f = new LoadingForm(); f.Function = (() => { Directory_Image_Extract(selectedFolderExtractName); }); f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); ExtractImage_View_ListSave(); } else { MessageBox.Show("plz... FileOpen"); } }
void ProccessList_ButtonClick(object sender, EventArgs e) { var engine = IronPython.Hosting.Python.CreateEngine(); var scope = engine.CreateScope(); var paths = engine.GetSearchPaths(); paths.Add(@".\Lib"); engine.SetSearchPaths(paths); var source = engine.CreateScriptSourceFromString(code, Microsoft.Scripting.SourceCodeKind.Statements); source.Execute(scope); if (Windows_radioButton.Checked) { var ProcessList_python = scope.GetVariable <Func <object, object, object, object> >("ProcessList"); List ProcessList = new List(); LoadingForm f = new LoadingForm(); f.Function = (() => { ProcessList = (List)ProcessList_python(".\\Lib\\application.py", "", ""); }); f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); List <string> ProcessList_C = new List <string>(); ProcessList_C.Clear(); foreach (string data in ProcessList) { ProcessList_C.Add(data); } Process_View.Items.Clear(); if (ProcessList_C[0] == "Failed") { MessageBox.Show("Frdia-Server Start Plz...."); } else { int i = 2; while (true) { int testnum = 0; ListViewItem lvt = new ListViewItem(); if (int.TryParse(ProcessList_C[i], out testnum)) { lvt.Text = ProcessList_C[i]; i++; } if (i + 1 < ProcessList_C.Count) { if (!int.TryParse(ProcessList_C[i + 1], out testnum)) { if (!int.TryParse(ProcessList_C[i + 2], out testnum)) { lvt.SubItems.Add("" + ProcessList_C[i] + " " + ProcessList_C[i + 1] + " " + ProcessList_C[i + 1]); i = i + 2; } else { lvt.SubItems.Add("" + ProcessList_C[i] + " " + ProcessList_C[i + 1]); i++; } } else if (ProcessList_C[i] == "Flex") { lvt.SubItems.Add("" + ProcessList_C[i] + " " + ProcessList_C[i + 1]); i++; } else { lvt.SubItems.Add(ProcessList_C[i]); } i++; } else { lvt.SubItems.Add(ProcessList_C[i]); break; } Process_View.Items.Add(lvt); Process_View.FullRowSelect = true; } Process_View.EndUpdate(); } } else if (SelectMenu.SelectedItem.ToString() == "USB") { var ProcessList_python = scope.GetVariable <Func <object, object, object, object> >("ProcessList"); List ProcessList = new List(); LoadingForm f = new LoadingForm(); f.Function = (() => { ProcessList = (List)ProcessList_python(".\\Lib\\application.py", "U", ""); }); f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); List <string> ProcessList_C = new List <string>(); ProcessList_C.Clear(); foreach (string data in ProcessList) { ProcessList_C.Add(data); } Process_View.Items.Clear(); if (ProcessList_C[0] == "Failed") { MessageBox.Show("Frdia-Server Start Plz...."); } else { int i = 2; while (true) { int testnum = 0; ListViewItem lvt = new ListViewItem(); if (int.TryParse(ProcessList_C[i], out testnum)) { lvt.Text = ProcessList_C[i]; i++; } if (i + 1 < ProcessList_C.Count) { if (!int.TryParse(ProcessList_C[i + 1], out testnum)) { if (!int.TryParse(ProcessList_C[i + 2], out testnum)) { lvt.SubItems.Add("" + ProcessList_C[i] + " " + ProcessList_C[i + 1] + " " + ProcessList_C[i + 1]); i = i + 2; } else { lvt.SubItems.Add("" + ProcessList_C[i] + " " + ProcessList_C[i + 1]); i++; } } else if (ProcessList_C[i] == "Flex") { lvt.SubItems.Add("" + ProcessList_C[i] + " " + ProcessList_C[i + 1]); i++; } else { lvt.SubItems.Add(ProcessList_C[i]); } i++; } else { lvt.SubItems.Add(ProcessList_C[i]); break; } Process_View.Items.Add(lvt); Process_View.FullRowSelect = true; } Process_View.EndUpdate(); } } else if (SelectMenu.SelectedItem.ToString() == "DEVICE") { var ProcessList_python = scope.GetVariable <Func <object, object, object, object> >("ProcessList"); string address = AddressInsert.Text.ToString(); List ProcessList = new List(); LoadingForm f = new LoadingForm(); f.Function = (() => { ProcessList = (List)ProcessList_python(".\\Lib\\application.py", "D", address); }); f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); List <string> ProcessList_C = new List <string>(); ProcessList_C.Clear(); foreach (string data in ProcessList) { ProcessList_C.Add(data); } Process_View.Items.Clear(); if (ProcessList_C[0] == "Failed") { MessageBox.Show("Frdia-Server Start Plz...."); } else { int i = 2; while (true) { int testnum = 0; ListViewItem lvt = new ListViewItem(); if (int.TryParse(ProcessList_C[i], out testnum)) { lvt.Text = ProcessList_C[i]; i++; } if (i + 1 < ProcessList_C.Count) { if (!int.TryParse(ProcessList_C[i + 1], out testnum)) { if (!int.TryParse(ProcessList_C[i + 2], out testnum)) { lvt.SubItems.Add("" + ProcessList_C[i] + " " + ProcessList_C[i + 1] + " " + ProcessList_C[i + 1]); i = i + 2; } else { lvt.SubItems.Add("" + ProcessList_C[i] + " " + ProcessList_C[i + 1]); i++; } } else if (ProcessList_C[i] == "Flex") { lvt.SubItems.Add("" + ProcessList_C[i] + " " + ProcessList_C[i + 1]); i++; } else { lvt.SubItems.Add(ProcessList_C[i]); } i++; } else { lvt.SubItems.Add(ProcessList_C[i]); break; } Process_View.Items.Add(lvt); Process_View.FullRowSelect = true; } Process_View.EndUpdate(); } } else { MessageBox.Show("error"); } }
void Data_Dump_ButtonClick(object sender, EventArgs e) { if (selectedDevice == "" || selectedProcessName == "") { MessageBox.Show("Device && Process Select Plz...."); } else { System.Diagnostics.ProcessStartInfo proInfo = new System.Diagnostics.ProcessStartInfo(); System.Diagnostics.Process pro = new System.Diagnostics.Process(); proInfo.FileName = @"cmd"; proInfo.CreateNoWindow = true; proInfo.UseShellExecute = false; proInfo.RedirectStandardOutput = true; proInfo.RedirectStandardInput = true; proInfo.RedirectStandardError = true; pro.StartInfo.WorkingDirectory = filePath + @"/"; pro.StartInfo = proInfo; pro.Start(); string sDirPath; sDirPath = Application.StartupPath + "\\Dump\\Data_Dump\\" + selectedProcessName; DirectoryInfo di = new DirectoryInfo(sDirPath); if (di.Exists == false) { di.Create(); } LoadingForm f = new LoadingForm(); f.Function = (() => { if (Emulator_RadioButton.Checked) { pro.StandardInput.Write(@"adb -s " + selectedDevice + " shell chmod -R 777 /data/data/" + selectedProcessName + "" + Environment.NewLine); } else { pro.StandardInput.Write(@"adb -s " + selectedDevice + " shell su -c \"chmod -R 777 /data/data/" + selectedProcessName + "\"" + Environment.NewLine); } pro.StandardInput.Write(@"adb -s " + selectedDevice + " pull /data/data/" + selectedProcessName + " .\\Dump\\Data_Dump\\" + selectedProcessName + "" + Environment.NewLine); }); f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); pro.StandardInput.Close(); pro.StandardOutput.ReadToEnd(); pro.WaitForExit(); pro.Close(); var engine = IronPython.Hosting.Python.CreateEngine(); var scope = engine.CreateScope(); var source = engine.CreateScriptSourceFromString(code, Microsoft.Scripting.SourceCodeKind.Statements); source.Execute(scope); var cmd_Python = scope.GetVariable <Func <string, string> >("CMD_python"); string cmd_DataDumpFile_View = ""; string cmd_DataDumpFile = ""; if (Emulator_RadioButton.Checked) { cmd_DataDumpFile = "adb -s " + selectedDevice + " shell \"ls -al /data/data/ | grep " + selectedProcessName + "\""; } else { cmd_DataDumpFile = "adb -s " + selectedDevice + " shell su -c \"ls -al /data/data/ | grep " + selectedProcessName + "\""; } LoadingForm f2 = new LoadingForm(); f2.Function = (() => { cmd_DataDumpFile_View = cmd_Python(cmd_DataDumpFile); }); f2.StartPosition = FormStartPosition.CenterParent; f2.ShowDialog(); cmd_view.AppendText("-----------------------------------------------------\r\n"); cmd_view.AppendText(cmd_DataDumpFile_View); cmd_view.AppendText("-----------------------------------------------------\r\n"); cmd_view.AppendText("[+] " + selectedProcessName + " Data_Dump Complete\r\n"); } }
void cmd_click(object sender, EventArgs e) { var engine = IronPython.Hosting.Python.CreateEngine(); var scope = engine.CreateScope(); var source = engine.CreateScriptSourceFromString(code, Microsoft.Scripting.SourceCodeKind.Statements); source.Execute(scope); var cmd_Python = scope.GetVariable <Func <string, string> >("CMD_python"); string[] split_Filename = selectedFilename.Split('.'); string[] selectedApktool = Directory.GetFiles(".\\Lib", "apktool_*.jar"); if (selectedMenu == "Decompile") { if (selectedFilename == "") { MessageBox.Show("File Select Plz...."); } else { string cmd_Decompile_View = ""; string cmd_Decompile = "java -Xmx512m -jar " + selectedApktool[0] + " d .\\Input_File\\" + selectedFilename + " -o .\\Output_Decompile\\" + split_Filename[0]; cmd_view.AppendText("---------------------------------------------------------------------------------------------------------\r\n"); cmd_view.AppendText("[+] " + selectedFilename + " Decompiling ...\r\n"); LoadingForm f = new LoadingForm(); f.Function = (() => { cmd_Decompile_View = cmd_Python(cmd_Decompile); }); f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); cmd_view.AppendText(cmd_Decompile_View); cmd_view.AppendText("[+] Decompiling Complete\r\n"); } } else if (selectedMenu == "Sign-Compile") { if (selectedFilename == "") { MessageBox.Show("File Select Plz...."); } else { string cmd_Compile_View = ""; string cmd_Sign_View = ""; string cmd_Compile = "java -Xmx512m -jar " + selectedApktool[0] + " b .\\Output_Decompile\\" + split_Filename[0] + " -o .\\Output_SignedFile\\Modify_" + selectedFilename; string cmd_Sign = "java -Xmx512m -jar .\\Lib\\signapk.jar .\\Lib\\testkey.x509.pem .\\Lib\\testkey.pk8 .\\Output_SignedFile\\Modify_" + selectedFilename + " .\\Output_SignedFile\\Signed_" + selectedFilename; cmd_view.AppendText("---------------------------------------------------------------------------------------------------------\r\n"); cmd_view.AppendText("[+] " + selectedFilename + " Building ...\r\n"); cmd_Python("del /Q .\\Output_SignedFile\\*.*"); LoadingForm f1 = new LoadingForm(); f1.Function = (() => { cmd_Compile_View = cmd_Python(cmd_Compile); }); f1.StartPosition = FormStartPosition.CenterParent; f1.ShowDialog(); cmd_view.AppendText(cmd_Compile_View); cmd_view.AppendText("[+] Building Complete\r\n"); cmd_view.AppendText("[+] Modify_" + selectedFilename + " Signing ...\r\n"); LoadingForm f2 = new LoadingForm(); f2.Function = (() => { cmd_Sign_View = cmd_Python(cmd_Sign); }); f2.StartPosition = FormStartPosition.CenterParent; f2.ShowDialog(); cmd_view.AppendText(cmd_Sign_View); cmd_Python("del .\\Output_SignedFile\\Modify_" + selectedFilename); cmd_view.AppendText("[+] Signed_" + selectedFilename + " Signing Complete\r\n"); } } else if (selectedMenu == "Re-Install") { if (selectedDevice == "") { MessageBox.Show("Device Select Plz...."); } else { string cmd_Re_Install_View = ""; string cmd_Re_Install = "adb -s " + selectedDevice + " -d install -r .\\Output_SignedFile\\Signed_" + selectedFilename; cmd_view.AppendText("---------------------------------------------------------------------------------------------------------\r\n"); cmd_view.AppendText("[+] Signed_" + selectedFilename + " installing ...\r\n"); LoadingForm f = new LoadingForm(); f.Function = (() => { cmd_Re_Install_View = cmd_Python(cmd_Re_Install); }); f.StartPosition = FormStartPosition.CenterParent; f.ShowDialog(); cmd_view.AppendText(cmd_Re_Install_View); cmd_view.AppendText("[+] Signed_" + selectedFilename + " Install Complete\r\n"); } } else { MessageBox.Show("plz... Select Menu"); } }