Exemplo n.º 1
0
        private void _____ATTACK___(AttackDetails _Atk_details, ref Label L_statue, ref Label L_code, ref LinkLabel L_source, ref Label hint, string attacker = "")
        {
            Notify(_Atk_details.Target + " Attacking ");
            L_statue.Text = L_code.Text = "...";

            __HTTTPAttack_ at = new __HTTTPAttack_();

            at.Payload = _Atk_details.Payload;
            at._Url    = _Atk_details.URL;
            at.SetTargetHeader(_Atk_details.Target);
            at.Attack_Current_Header();
            at.owner = _Atk_details.Owner;

            if (at.Succeeded)
            {
                if (at.IsCurrentHeaderVulnerable())
                {
                    L_statue.Text = "Vulnerable " + Payloads.Percent(at.Payload);
                }
                else
                {
                    L_statue.Text = "Not Vulnerable";
                }
            }
            else
            {
                L_statue.Text = "Error ";
            }

            L_code.Text = at.statueCode;
            AddAttackToList(at);
            L_code.Visible = true;
            switch (attacker.ToLower().Trim())
            {
            case "cus": __CustomAttack = __HTTTPAttack_.Copy(at); break;

            case "xf":
            case "x-forwarded-for": __XfrwrdAttack = __HTTTPAttack_.Copy(at); break;

            case "c*k":
            case "cookie": __CookieAttack = __HTTTPAttack_.Copy(at); break;

            case "ua":
            case "useragent":
            case "user-agent": __UserAgentAttack = __HTTTPAttack_.Copy(at); break;

            case "ref":
            case "referer": __RefererAttack = __HTTTPAttack_.Copy(at); break;

            case "mul":
            case "multi": __MultidAttack = __HTTTPAttack_.Copy(at); break;
            }
            hint.Text    = at.Message;
            hint.Visible = true;
            this.Notify(at.Summary(), 3000);
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            AttackDetails _Atk_details = new AttackDetails();

            _Atk_details.LoadFromSettings();
            _Atk_details.Owner   = "Reflector";
            _Atk_details.Payload = GetPayload();

            Notify("");
            Thread.Sleep(100);
            // allow user to customize Attack
            if (checkBox_Adv.Checked)
            {
                FrmAttackPrefix a = new FrmAttackPrefix(_Atk_details);
                if (a.ShowDialog() == DialogResult.OK)
                {
                    _Atk_details = a.Curent_atack_Dtals;
                }
                else
                {
                    return;
                }
            }
            _Atk_details.URL = TxbxUrl.Text;

            if (Rb_Multi.Checked)
            {
                if (_Atk_details.UseAdvInjection == false || _Atk_details.Payload == "")
                {
                    _Atk_details.Payload = Payloads.GetPayload(Payload_.string_);
                }

                __HTTTPAttack_ at = new __HTTTPAttack_();
                at.Payload = _Atk_details.Payload;
                at._Url    = _Atk_details.URL;
                at.SetTargetedHeaders(this.multi_headers);
                at.owner = _Atk_details.Owner;

                lbl_all_statue.Text = at.Attack_All_Headers()?("Vulnerable" + Payloads.Percent(at.Payload)):"Not vulnerable";
                if (at.HasError)
                {
                    lbl_all_statue.Text = "Error " + at.Message;
                }



                lbl_all_code.Text    = at.statueCode;
                lbl_hint_all.Text    = at.Message;
                lbl_hint_all.Visible = true;

                AddAttackToList(at);
                __MultidAttack = __HTTTPAttack_.Copy(at);
                this.Notify(at.Summary(), 3000);
            }
            else if (RB_X_Forwarded_For.Checked)
            {
                if (_Atk_details.UseAdvInjection == false || _Atk_details.Payload == "")
                {
                    _Atk_details.Payload = Payloads.GetPayload(Payload_.ip);
                }
                _Atk_details.Target = "X-Forwarded-For";
                _____ATTACK___(_Atk_details, ref lbl_XforwardedFor_statue, ref lbl_Xforwarded_Code, ref _lnklbl_XForwardedFor_Details, ref lbl_hint_xf, "xf"); // //
            }

            else if (RB_Referer.Checked)
            {
                if (_Atk_details.UseAdvInjection == false || _Atk_details.Payload == "")
                {
                    _Atk_details.Payload = Payloads.GetPayload(Payload_.url);
                }
                _Atk_details.Target = "Referer";
                _____ATTACK___(_Atk_details, ref lbl_Referer_Statue, ref lbl_Referer_code, ref _lnklbl_Referer_Details, ref lbl_hint_referer, "ref"); // //
            }
            else if (RBCookie.Checked)
            {
                if (_Atk_details.UseAdvInjection == false || _Atk_details.Payload == "")
                {
                    _Atk_details.Payload = Payloads.GetPayload(Payload_.cookie);
                }
                _Atk_details.Target = "cookie";
                _____ATTACK___(_Atk_details, ref lbl_Cookie_statue, ref lbl_Cookie_code, ref _lnklbl_Cookie_Details, ref lbl_hint_cookie, "c*k"); // //
            }
            else if (rbUserAgent.Checked)                                                                                                         // user agent
            {
                if (_Atk_details.UseAdvInjection == false || _Atk_details.Payload == "")
                {
                    _Atk_details.Payload = Payloads.GetPayload(Payload_.string_);
                }
                _Atk_details.Target = "User-Agent";
                _____ATTACK___(_Atk_details, ref lbl_useragent_statue, ref lbl_useragent_code, ref _lnklbl_useragent_Details, ref lbl_hint_agent, "ua"); // //
            }
            else if (rbCust.Checked)                                                                                                                     // cutome header
            {
                _Atk_details.Target = rbCust.Text;
                if (_Atk_details.UseAdvInjection == false || _Atk_details.Payload == "")
                {
                    _Atk_details.Payload = Payloads.GuessPayload(_Atk_details.Target);
                }
                _____ATTACK___(_Atk_details, ref lbl_cust_statue, ref lbl_cust_code, ref _lnklbl_custom_Details, ref lbl_hint_Cust, "cus"); // //
            }

            Thread.Sleep(1000);

            CheckAttacksDetails();
        }