• Home
  • Hacking & Security
    • Network Hacking
    • Web Hacking
    • Social Engineering
    • Kali Linux
    Submit An Article
  • Courses
    • All Courses
    • Bundles
    • Masterclass
    • VIP Membership
    • FAQ

    Popular Courses

  • Shop
  • Competition
  • Services
    Penetration Testing
    Consulting
    Code Review
    One on one Training
    Online Courses
    VPN
  • Blog
      • Cart

    VIP Membership Masterclass
    Got a question?
    [email protected]
    RegisterLogin
    zSecurity
    • Home
    • Hacking & Security
      • Network Hacking
      • Web Hacking
      • Social Engineering
      • Kali Linux
      Submit An Article
    • Courses
      • All Courses
      • Bundles
      • Masterclass
      • VIP Membership
      • FAQ

      Popular Courses

    • Shop
    • Competition
    • Services
      Penetration Testing
      Consulting
      Code Review
      One on one Training
      Online Courses
      VPN
    • Blog
        • Cart

      Peter Queen

      Home › Forums › Peter Queen

      • Profile
      • Topics Started
      • Replies Created
      • Engagements
      • Favorites

      Forum Replies Created

      Viewing 15 posts - 1 through 15 (of 34 total)
      1 2 3 →
      • Author
        Posts
      • August 11, 2020 at 1:08 pm in reply to: Download and execute – osx #44000
        Peter Queen
        Participant

        Hi Diego,

        To clarify my last post, I know how to turn a applescript payload into an application but my problem is to turn a python script into an application for osx.

        August 11, 2020 at 11:05 am in reply to: Download and execute – osx #43997
        Peter Queen
        Participant

        Hi Diego,

        I am not sure I understand correctly. I compiled the python script on a osx machine using pyinstaller as shown in the lesson and i get an exe. As exe are Windows executable only how do I compile the script into an osx executable? From the social engineering course I learned how to turn bat file into a script but how do I do it with a Python script? As you can see I am very confused.

        Thanks for clarifying

        August 9, 2020 at 8:18 am in reply to: Download and execute – osx #43875
        Peter Queen
        Participant

        Thanks Diego,

        I am now able to download the JPEG but I have a problem with the backdoor. I added open inside subprocess.call but it does’t execute the exe. Instead it opens the Unarchiver app on screen and no connection gets established . Is open the right command to run the reverse backdoor?

        Thanks for your help

        July 27, 2020 at 9:58 am in reply to: Keylogger issues #43133
        Peter Queen
        Participant

        Hello Diego,

        1. I run sudo pip3 install pynput and it is installed. My pip version is 20.1.1
        2. Numbers on the right , I am using a desktop keyboard.

        July 27, 2020 at 9:25 am in reply to: Persistancy on macOS #43131
        Peter Queen
        Participant

        Thanks a lot Diego, I will read it.

        Is the subject covered in any of the courses? Also any other course that has coding in it? I have done a few but this one is by far the most interesting as we write our codes.

        July 27, 2020 at 9:20 am in reply to: Vulnerability scanner #43129
        Peter Queen
        Participant

        Hello Diego,

        here is the code:

        #!/usr/bin/env python
        
        import requests
        import re
        import urllib.parse as urlparse
        from bs4 import BeautifulSoup
        
        class Scanner:
            def __init__(self, url, ignore_links):
                self.session = requests.Session()
                self.target_url = url
                self.target_links = []
                self.links_to_ignore = ignore_links
        
            def extract_links_from(self, url):
                response = self.session.get(url)
                return re.findall('(?:href=")(.*?)"', response.content.decode(errors="ignore"))  # response.content.decode(ignore="error))
        
            def crawl(self, url=None):
                if url == None:
                    url =self.target_url
        
                href_links = self.extract_links_from(url)
                for link in href_links:
                    link = urlparse.urljoin(url, link)
        
                    if "#" in link:
                        link = link.split("#")[0]
        
                    if self.target_url in link and link not in self.target_links and link not in self.links_to_ignore:
                        self.target_links.append(link)
                        print(link)
                        self.crawl(link)
        
            def extract_forms(self,url):
                response = self.session.get(url)
                parsed_html = BeautifulSoup(response.content, features="lxml")
                return parsed_html.findAll("form")
        
            def submit_form(self, form, value, url):
                action = form.get("action")
                post_url = urlparse.urljoin(url, action)
                method = form.get("method")
        
                inputs_list = form.findAll("input")
                post_data = {}
                for input in inputs_list:
                    input_name = input.get("name")
                    input_type = input.get("type")
                    input_value = input.get("value")
                    if input_type == "text":
                        input_value = value
        
                    post_data[input_name] = input_value
                    if method == "post":
                        return self.session.post(post_url, data=post_data)
                        return self.session.get(post_url, params=post_data)
        
            def run_scanner(self):
                for link in self.target_links:
                    forms = self.extract_forms(link)
                    for form in forms:
                        print("[+] Testing form in " + link)
                        is_vulnerable_to_xss = self.test_xxs_in_form(form, link)
                        if is_vulnerable_to_xss:
                            print("[****] XXS discovered in " + link + "in the following form")
                            print(form)
        
                    if  "=" in link:
                        print("\n\n[+] Testing  " + link)
                        is_vulnerable_to_xss = self.test_xxs_in_link(link)
                        if is_vulnerable_to_xss:
                            print("[****] XXS discovered in " + link )
        
            def test_xxs_in_link(self,url):
                xxs_test_script = "<sCript>alert('test')</scriPt>"
                url = url.replace("=", "=" + xxs_test_script)
                response = self.session.get(url)
                return xxs_test_script.encode() in response.content
        
            def test_xxs_in_form(self, form, url):
                xxs_test_script = "<sCript>alert('test')</scriPt>"
                response = self.submit_form(form, xxs_test_script, url)
                return xxs_test_script.encode() in response.content
        July 26, 2020 at 9:27 am in reply to: Vulnerability scanner #43067
        Peter Queen
        Participant

        Hi Diego,

        I fixed the code but I still get the exact same error.

        July 24, 2020 at 9:59 am in reply to: Vulnerability scanner #42938
        Peter Queen
        Participant

        Hi Diego!

        I tried the findAll and I get the same error as I get with find_all:

        [email protected]:~/PycharmProjects/vulnerability-scanner# python3 vulnerability_scanner.py 
        http://10.0.2.14/dvwa/dvwa/css/main.css
        http://10.0.2.14/dvwa/favicon.ico
        http://10.0.2.14/dvwa/
        http://10.0.2.14/dvwa/instructions.php
        http://10.0.2.14/dvwa/setup.php
        http://10.0.2.14/dvwa/vulnerabilities/brute/
        http://10.0.2.14/dvwa/vulnerabilities/exec/
        http://10.0.2.14/dvwa/vulnerabilities/csrf/
        http://10.0.2.14/dvwa/vulnerabilities/fi/?page=include.php
        http://10.0.2.14/dvwa/vulnerabilities/sqli/
        http://10.0.2.14/dvwa/vulnerabilities/sqli_blind/
        http://10.0.2.14/dvwa/vulnerabilities/upload/
        http://10.0.2.14/dvwa/vulnerabilities/xss_r/
        http://10.0.2.14/dvwa/vulnerabilities/xss_s/
        http://10.0.2.14/dvwa/security.php
        http://10.0.2.14/dvwa/phpinfo.php
        http://10.0.2.14/dvwa/phpinfo.php?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000
        http://10.0.2.14/dvwa/about.php
        http://10.0.2.14/dvwa/instructions.php?doc=PHPIDS-license
        http://10.0.2.14/dvwa/instructions.php?doc=readme
        http://10.0.2.14/dvwa/instructions.php?doc=changelog
        http://10.0.2.14/dvwa/instructions.php?doc=copying
        http://10.0.2.14/dvwa/security.php?phpids=on
        http://10.0.2.14/dvwa/security.php?phpids=off
        http://10.0.2.14/dvwa/security.php?test=%22><script>eval(window.name)</script>
        http://10.0.2.14/dvwa/ids_log.php
        [+] Testing form in http://10.0.2.14/dvwa/setup.php
        [+] Testing form in http://10.0.2.14/dvwa/vulnerabilities/brute/
        [+] Testing form in http://10.0.2.14/dvwa/vulnerabilities/exec/
        [+] Testing form in http://10.0.2.14/dvwa/vulnerabilities/csrf/
        
        [+] Testing  http://10.0.2.14/dvwa/vulnerabilities/fi/?page=include.php
        [+] Testing form in http://10.0.2.14/dvwa/vulnerabilities/sqli/
        [+] Testing form in http://10.0.2.14/dvwa/vulnerabilities/sqli_blind/
        [+] Testing form in http://10.0.2.14/dvwa/vulnerabilities/upload/
        Traceback (most recent call last):
          File "vulnerability_scanner.py", line 13, in <module>
            vuln_scanner.run_scanner()
          File "/root/PycharmProjects/vulnerability-scanner/scanner.py", line 66, in run_scanner
            is_vulnerable_to_xss = self.test_xxs_in_form(form, link)
          File "/root/PycharmProjects/vulnerability-scanner/scanner.py", line 87, in test_xxs_in_form
            return xxs_test_script.encode() in response.content
        AttributeError: 'NoneType' object has no attribute 'content'

        any suggestions? thanks!

        July 23, 2020 at 9:39 am in reply to: Vulnerability scanner #42880
        Peter Queen
        Participant

        see here:

        Since html.parser is not the same parser as SGMLParser, you may find that Beautiful Soup 4 gives you a different parse tree than Beautiful Soup 3 for the same markup. If you swap out html.parser for lxml or html5lib, you may find that the parse tree changes yet again. If this happens, you’ll need to update your scraping code to deal with the new tree.
        Method names

        renderContents -> encode_contents
        replaceWith -> replace_with
        replaceWithChildren -> unwrap
        findAll -> find_all
        findAllNext -> find_all_next
        findAllPrevious -> find_all_previous
        findNext -> find_next
        findNextSibling -> find_next_sibling
        findNextSiblings -> find_next_siblings
        findParent -> find_parent
        findParents -> find_parents
        findPrevious -> find_previous
        findPreviousSibling -> find_previous_sibling
        findPreviousSiblings -> find_previous_siblings
        getText -> get_text

        July 23, 2020 at 9:36 am in reply to: Vulnerability scanner #42879
        Peter Queen
        Participant

        Hello Diego,

        I think with this version of BeautifulSoup i need to use find_all, see the error i get with findALL:

        `[email protected]:~/PycharmProjects/vulnerability-scanner# python3 vulnerability_scanner.py
        http://10.0.2.14/dvwa/dvwa/css/main.css
        http://10.0.2.14/dvwa/favicon.ico
        http://10.0.2.14/dvwa/
        http://10.0.2.14/dvwa/instructions.php
        http://10.0.2.14/dvwa/setup.php
        http://10.0.2.14/dvwa/vulnerabilities/brute/
        http://10.0.2.14/dvwa/vulnerabilities/exec/
        http://10.0.2.14/dvwa/vulnerabilities/csrf/
        http://10.0.2.14/dvwa/vulnerabilities/fi/?page=include.php
        http://10.0.2.14/dvwa/vulnerabilities/sqli/
        http://10.0.2.14/dvwa/vulnerabilities/sqli_blind/
        http://10.0.2.14/dvwa/vulnerabilities/upload/
        http://10.0.2.14/dvwa/vulnerabilities/xss_r/
        http://10.0.2.14/dvwa/vulnerabilities/xss_s/
        http://10.0.2.14/dvwa/security.php
        http://10.0.2.14/dvwa/phpinfo.php
        http://10.0.2.14/dvwa/phpinfo.php?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000
        http://10.0.2.14/dvwa/about.php
        http://10.0.2.14/dvwa/instructions.php?doc=PHPIDS-license
        http://10.0.2.14/dvwa/instructions.php?doc=readme
        http://10.0.2.14/dvwa/instructions.php?doc=changelog
        http://10.0.2.14/dvwa/instructions.php?doc=copying
        http://10.0.2.14/dvwa/security.php?phpids=on
        http://10.0.2.14/dvwa/security.php?phpids=off
        http://10.0.2.14/dvwa/security.php?test=%22><script>eval(window.name)</script&gt;
        http://10.0.2.14/dvwa/ids_log.php
        Traceback (most recent call last):
        File “vulnerability_scanner.py”, line 13, in <module>
        vuln_scanner.run_scanner()
        File “/root/PycharmProjects/vulnerability-scanner/scanner.py”, line 63, in run_scanner
        forms = self.extract_forms(link)
        File “/root/PycharmProjects/vulnerability-scanner/scanner.py”, line 39, in extract_forms
        return parsed_html.findALL(“form”) # find_all
        TypeError: ‘NoneType’ object is not callable
        [email protected]:~/PycharmProjects/vulnerability-scanner#

        July 22, 2020 at 6:26 pm in reply to: Vulnerability scanner #42844
        Peter Queen
        Participant

        Hello Diego,

        Yes it was a the / the was missing, I now run into another error:

        #!/usr/bin/env python
        
        import requests
        import re
        import urllib.parse as urlparse
        from bs4 import BeautifulSoup
        
        class Scanner:
            def __init__(self, url, ignore_links):
                self.session = requests.Session()
                self.target_url = url
                self.target_links = []
                self.links_to_ignore = ignore_links
        
            def extract_links_from(self, url):
                response = self.session.get(url)
                return re.findall('(?:href=")(.*?)"', response.content.decode(errors="ignore"))  # response.content.decode(ignore="error))
        
            def crawl(self, url=None):
                if url == None:
                    url =self.target_url
        
                href_links = self.extract_links_from(url)
                for link in href_links:
                    link = urlparse.urljoin(url, link)
        
                    if "#" in link:
                        link = link.split("#")[0]
        
                    if self.target_url in link and link not in self.target_links and link not in self.links_to_ignore:
                        self.target_links.append(link)
                        print(link)
                        self.crawl(link)
        
            def extract_forms(self,url):
                response = self.session.get(url)
                parsed_html = BeautifulSoup(response.content, features="lxml")
                return parsed_html.find_all("form")
        
            def submit_form(self, form, value, url):
                action = form.get("action")
                post_url = urlparse.urljoin(url, action)
                method = form.get("method")
        
                inputs_list = form.find_all("input")
                post_data = {}
                for input in inputs_list:
                    input_name = input.get("name")
                    input_type = input.get("type")
                    input_value = input.get("value")
                    if input_type == "text":
                        input_value = value
        
                    post_data[input_name] = input_value
                    if method == "post":
                        return self.session.post(post_url, data=post_data)
                    return self.session.get(post_url, params=post_data)
        
            def run_scanner(self):
                for link in self.target_links:
                    forms = self.extract_forms(link)
                    for form in forms:
                        print("[+] Testing form in " + link)
                        is_vulnerable_to_xss = self.test_xxs_in_form(form, link)
                        if is_vulnerable_to_xss:
                            print("[****] XXS discovered in " + link + "in the following form")
                            print(form)
        
                    if  "=" in link:
                        print("\n\n[+] Testing  " + link)
                        is_vulnerable_to_xss = self.test_xxs_in_link(link)
                        if is_vulnerable_to_xss:
                            print("[****] XXS discovered in " + link )
        
            def test_xxs_in_link(self,url):
                xxs_test_script = "<sCript>alert('test')</scriPt>"
                url = url.replace("=", "=" + xxs_test_script)
                response = self.session.get(url)
                return xxs_test_script.encode() in response.content
        
            def test_xxs_in_form(self, form, url):
                xxs_test_script = "<sCript>alert('test')</scriPt>"
                response = self.submit_form(form, xxs_test_script, url)
                return xxs_test_script.encode() in response.content
        #!/usr/bin/env python
        
        import scanner
        
        target_url = "http://10.0.2.14/dvwa/"
        links_to_ignore =["http://10.0.2.14/dvwa/logout.php"]
        data_dict = {"username": "admin", "password": "password", "Login": "submit"}
        
        vuln_scanner = scanner.Scanner(target_url, links_to_ignore)
        vuln_scanner.session.post("http://10.0.2.14/dvwa/login.php", data=data_dict)
        
        vuln_scanner.crawl()
        vuln_scanner.run_scanner()

        Error:

        [email protected]:~/PycharmProjects/vulnerability-scanner# python3 vulnerability_scanner.py 
        http://10.0.2.14/dvwa/dvwa/css/main.css
        http://10.0.2.14/dvwa/favicon.ico
        http://10.0.2.14/dvwa/
        http://10.0.2.14/dvwa/instructions.php
        http://10.0.2.14/dvwa/setup.php
        http://10.0.2.14/dvwa/vulnerabilities/brute/
        http://10.0.2.14/dvwa/vulnerabilities/exec/
        http://10.0.2.14/dvwa/vulnerabilities/csrf/
        http://10.0.2.14/dvwa/vulnerabilities/fi/?page=include.php
        http://10.0.2.14/dvwa/vulnerabilities/sqli/
        http://10.0.2.14/dvwa/vulnerabilities/sqli_blind/
        http://10.0.2.14/dvwa/vulnerabilities/upload/
        http://10.0.2.14/dvwa/vulnerabilities/xss_r/
        http://10.0.2.14/dvwa/vulnerabilities/xss_s/
        http://10.0.2.14/dvwa/security.php
        http://10.0.2.14/dvwa/phpinfo.php
        http://10.0.2.14/dvwa/phpinfo.php?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000
        http://10.0.2.14/dvwa/about.php
        http://10.0.2.14/dvwa/instructions.php?doc=PHPIDS-license
        http://10.0.2.14/dvwa/instructions.php?doc=readme
        http://10.0.2.14/dvwa/instructions.php?doc=changelog
        http://10.0.2.14/dvwa/instructions.php?doc=copying
        http://10.0.2.14/dvwa/security.php?phpids=on
        http://10.0.2.14/dvwa/security.php?phpids=off
        http://10.0.2.14/dvwa/security.php?test=%22><script>eval(window.name)</script>
        http://10.0.2.14/dvwa/ids_log.php
        [+] Testing form in http://10.0.2.14/dvwa/setup.php
        [+] Testing form in http://10.0.2.14/dvwa/vulnerabilities/brute/
        [+] Testing form in http://10.0.2.14/dvwa/vulnerabilities/exec/
        [+] Testing form in http://10.0.2.14/dvwa/vulnerabilities/csrf/
        
        [+] Testing  http://10.0.2.14/dvwa/vulnerabilities/fi/?page=include.php
        [+] Testing form in http://10.0.2.14/dvwa/vulnerabilities/sqli/
        [+] Testing form in http://10.0.2.14/dvwa/vulnerabilities/sqli_blind/
        [+] Testing form in http://10.0.2.14/dvwa/vulnerabilities/upload/
        Traceback (most recent call last):
          File "vulnerability_scanner.py", line 13, in <module>
            vuln_scanner.run_scanner()
          File "/root/PycharmProjects/vulnerability-scanner/scanner.py", line 66, in run_scanner
            is_vulnerable_to_xss = self.test_xxs_in_form(form, link)
          File "/root/PycharmProjects/vulnerability-scanner/scanner.py", line 87, in test_xxs_in_form
            return xxs_test_script.encode() in response.content
        AttributeError: 'NoneType' object has no attribute 'content'
        [email protected]:~/PycharmProjects/vulnerability-scanner# 

        I could not work out, the same code few lines above doesn’t give an error.

        If I may I have a suggestion, I have done a Python course on Udemy and there was the possibility to download the source code of what we were learning, it was easier like this to spot typo by our self.

        Thanks

        July 16, 2020 at 6:27 am in reply to: Wine error #42248
        Peter Queen
        Participant

        Hi Diego,

        Yes I did install Wine first and then I was asked to install Wine32.

        This is the version:

        r`[email protected]:~# cat /etc/os-release
        PRETTY_NAME=”Kali GNU/Linux Rolling”
        NAME=”Kali GNU/Linux”
        ID=kali
        VERSION=”2020.1″
        VERSION_ID=”2020.1″
        VERSION_CODENAME=”kali-rolling”
        ID_LIKE=debian
        ANSI_COLOR=”1;31″
        HOME_URL=”https://www.kali.org/&#8221;
        SUPPORT_URL=”https://forums.kali.org/&#8221;
        BUG_REPORT_URL=”https://bugs.kali.org/&#8221;
        [email protected]:~#`

        July 16, 2020 at 6:20 am in reply to: Execute_and_report #42247
        Peter Queen
        Participant

        Hi Diego!

        no need to be sorry! You spotted it and now it’s working. I learn a lot from this kind of mistakes.

        Thanks again

        July 15, 2020 at 7:28 pm in reply to: Wine error #42204
        Peter Queen
        Participant

        Hello Diego,

        I installed Wine and then i needed to install wine32, once I tried i got this error:

        [email protected]:~/Downloads# apt-get install wine32
        Reading package lists... Done
        Building dependency tree       
        Reading state information... Done
        Some packages could not be installed. This may mean that you have
        requested an impossible situation or if you are using the unstable
        distribution that some required packages have not yet been created
        or been moved out of Incoming.
        The following information may help to resolve the situation:
        
        The following packages have unmet dependencies:
         wine32:i386 : Depends: libc6:i386 (>= 2.28) but it is not going to be installed
                       Depends: libwine:i386 (= 5.0-4) but it is not going to be installed
        E: Unable to correct problems, you have held broken packages.
        [email protected]:~/Downloads# 

        please advise

        July 15, 2020 at 7:11 am in reply to: Execute_and_report #42092
        Peter Queen
        Participant

        Hi Diego!

        Well spotted! 16 posts for a typo !! It works perfectly, thanks a lot!

      • Author
        Posts
      Viewing 15 posts - 1 through 15 (of 34 total)
      1 2 3 →

      Categories

      • Cryptography
      • Cryptography
      • CTF
      • Forensics
      • Hacking & Security
      • IOT
      • Kali Linux
      • Network Hacking
      • News
      • OSINT
      • Post Exploitation
      • Post Exploitation
      • Privacy
      • Programming
      • Security
      • Social Engineering
      • Uncategorized
      • Web Hacking

      Popular Posts

      Got a Blank Screen After Importing Kali in Virtual Box ? Here’s How To Fix It
      25Jan2018

      Connect with us

      • Facebook
      • Twitter
      • LinkedIn
      • Instagram
      • Youtube

      “Everything related to ethical hacking

      & cyber security in one place.”

      Quick Links

      • Home
      • About Us
      • Hacking & Security
      • Contact
      • FAQ

      Services

      • Penetration Testing
      • Consulting
      • Code Review
      • One on one training
      • VPN
      • VIP Membership

      Company

      • About Us
      • Contact
      • Vulnerability Disclosure

      Support

      • FAQ
      • Forums

      Copyright © 2021 zSecurity Ltd. All rights reserved.

      • Privacy
      • Refunds
      • Terms

      Contribute

      Share your knowledge with the world

      SUBMIT AN ARTICLE

      Login with your site account

      Lost your password?

      Not a member yet? Register now

      Register a new account


      Are you a member? Login now

      Learn more Hacking!

      While waiting for the download, why not follow us on media? We regularly post hacking tutorials and articles


      We are using cookies to give you the best experience on our website. This includes but is not limited to:

      • Storing your settings and preferences.
      • Remember your access information
      • Track website performance and make our website more relevant to you.

      You can find out more about which cookies we are using or switch them off in settings.

      Privacy Overview

      This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

      Strictly Necessary Cookies

      Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

      3rd Party Cookies

      This website uses Google Analytics and Linkedin to collect anonymous information such as the number of visitors to the site, and the most popular pages.

      Keeping this cookies enabled helps us to improve our website.

      Please enable Strictly Necessary Cookies first so that we can save your preferences!

      Powered by  GDPR Cookie Compliance