Linux Essentials For Hackers - #7 - Finding Files With Locate
Skills:
Linux & CLI90%
Key Takeaways
The video covers the use of the locate utility in Linux to find files, as part of the Linux Essentials For Hackers series.
Full Transcript
hey guys welcome back to the linux essential series for hackers in this video i'm going to be showing you how to use the locate utility to find files now i'll be also making an another video after this to show you how to use the find tool to actually find files as well so they're two utilities that you can use in this video we're going to be taking a look at how to use the locate tool it's a tool that goes ignored by many beginners or newcomers mostly because of its relative simplicity but it's a very efficient tool and does what it's supposed to do so again we can use the what is utility here to tell us more about what this tool is so again we can just say what is locate and as you can see it tells us it finds files by the name which is very simple and again you can use the manual page you can use the manual for this particular tool to learn how to use it so i'm just going to be covering just enough to make you efficient with the tool and make you understand how it works and how you can use it in conjunction with grip all right so uh let's actually get started with a very simple example right so let's say i wanted to locate a file on the system right and i wanted to locate a the password file so i can say locate password and hit enter and you can see it's given me a lot of a lot of information here a lot of files called password on my system right now this is really not efficient because um again i'm looking for a particular file that i'm looking for which is bill which actually exists in the etsy file and we can see the result well that's not actually the result here with this is the result right at the top here all right however this really is not efficient or an efficient way of going about it right so uh this is where we can now specify uh the options that we can use uh that we can use with uh with a tool like locate so let's say we wanted to get only the files that match this particular pattern or these particular uh strings here so the password string so to do this we type a or we use the uh we can use the all parameter or option here and once we hit enter again that gives us the same information so what does that means is it's actually displaying all the files on the system uh that actually match the patterns of password here and because this file really doesn't have any extension we now have to deal with the actual path or the path that we we might want to be uh finding this file in now of course that is counter-intuitive given that um i can say that this belongs in the etsy in the etsy directory and again that now uh it now actually narrows down uh the files into what they may be so again that's the the actual file where we were looking for but you can see how tedious this is so we can actually shorten this now by actually using the grep tool which actually showed you how to use and it's very very simple so again we're simply going to use grip to look for particular information related to the uh to the information that is is given to us by locate so we can now say locate and then we say uh we are looking for password and we close that and now we say we pipe the output and we say grip let's look for password uh within etsy within the etsy directory so again uh we can now say uh etsy here sorry fc and we say password or we can just say the hc directory here and then we can hit close and you can see it gives us the results we're looking for it highlights them in red or depending on the color scheme you're using in your terminal so again we can improve the efficiency of this by typing in etsy password and we hit enter so this is a file without a particular extension which makes it relatively difficult to actually find but you can find it relatively easily if you use grep here um so so let's actually talk about uh about another file that has an extension that we can use to explain this here all right so um let's say we're working with the uh the uh the resolve file or the resolve configuration file which is used for to modify your name servers which is available on all linux systems what we can say is we can say locate resolve and sorry resolve and we hit enter and again tons of files but now we know that this file has an extension so we can say locate it's we can say locate resolve dot conf and read enter and again it still gives us a lot of files but we're looking for the one that belongs in the that exists in the etsy folder again so what we can do now is we can say locate and we want to actually we're looking for we can use the all uh the old parameter here and then we say we're looking for uh all files with an extension or we're looking for a file with the with an extension of uh conf or config here so we'll use the wildcard option to mean that this we're looking for for all files with this particular extension so we say um all and then we say conf and we close those um these quotation marks and now we pipe the output into grep here and now with grep we can then say we are looking for resolve here and we uh sorry that is we're looking for resolve when we enter and now it gives us the information we're looking for and the first option here so again that's with the the actual extension of confirm so again we're limiting the results to uh only the files that have an extension of config or configuration and then we can use grep to find uh the particular string that is most important to us so let me give you another example because this seems very simple um so let's say we're looking for the proxychains right so we can say proxy change and hit enter and there you are you can see immediately now because that is a unique string it gives us the results immediately with the uh with the uh the extension here and that's because we specified it so again we can just say locate uh you know proxy chains and hit enter and there's a ton of files now another thing you might find useful is actually displaying uh how many results are matching the particular pattern you've specified exist so let's say i want to say locate i can say all that means all the the the matching uh the matching patterns here uh so we say all and then we can use the c uh the c argument here which specifies or prints the number of matching results and then we say we specify the string we're looking for or we can just say we're looking for proxy chains and we'd enter and it tells us here that we have 25 uh files uh or results that actually have the matching patterns here now if we limit it to conf and we hit enter now you can see we only have two so that's essentially how to use this tool in regards to you know displaying the amount of matching patterns you have and if you wanted to locate uh so if we get rid of this here and let's hit enter you can now see the results that it tells us here so we have the one in the etsy folder and one indeed the debian package management uh the debian package management folder uh in regards to its actual configuration there so that's how to use the locate tool now again let me just cover one more additional parameter you can use and that is the the i parameter which again is very important and that means that you want to ignore case that's something i should have mentioned earlier all searches with locate are typically going to be case sensitive so again i can say proxy chains and i hit enter and we have no results right so if i wanted to ignore the case sensitivity of what i've just hit of the the pattern i've just entered i can just hit i and i'd enter and again we get the same results and i can now limit this to proxychains.conf and there you are and again i can i can partner these or i can actually combine these commands with each other to give us the information we're looking for so again a very very simple tool to use but again it gives you very consistent results so that's pretty much for this gonna be it for this video guys i'll be seeing you in the next video you
Original Description
Welcome to the Linux Essentials For Hackers series, where we will be covering the 20% you need to know to be efficient with Linux. In this video, we will be covering how to use the locate utility to find files.
This series is sponsored by Linode, use the link below to get 20$ in free credits.
https://promo.linode.com/hackersploit/
Promo code: HACKERSPLOIT20
◼️Get Our Courses:
Python For Ethical Hacking: https://www.udemy.com/python-for-ethical-hacking-develop-pentesting-tools/?couponCode=PFEHJUN
Ethical Hacking Bootcamp: https://www.udemy.com/the-complete-ethical-hacking-bootcamp/?couponCode=TCEHB2019
◼️Our Platforms:
Blog: https://hsploit.com/
HackerSploit Forum: https://hackersploit.org/
HackerSploit Cybersecurity Services: https://hackersploit.io
HackerSploit Academy: https://www.hackersploit.academy
HackerSploit Discord: https://discord.gg/j3dH7tK
HackerSploit Podcast: https://soundcloud.com/hackersploit
iTunes: https://itunes.apple.com/us/podcast/the-hackersploit-podcast/id1439732519?mt=2
◼️Support us by using the following links:
Patreon: http://patreon.com/hackersploit
I hope you enjoy/enjoyed the video.
If you have any questions or suggestions feel free to post them in the comments section or on my social networks.
Social Networks - Connect With Us!
-------------------------------
Facebook: https://www.facebook.com/HackerSploit/
Twitter: https://twitter.com/HackerSploit
Instagram: https://www.instagram.com/hackersploit/
Patreon: http://patreon.com/hackersploit
--------------------------------
Thanks for watching!
Благодаря за гледането
Kiitos katsomisesta
Danke fürs Zuschauen!
感谢您观看
Merci d'avoir regardé
دیکھنے کے لیے شکریہ
देखने के लिए धन्यवाद
Grazie per la visione
Gracias por ver
شكرا للمشاهدة
#Linux#Hacking
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from HackerSploit · HackerSploit · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
How To Install Kali Linux 2.0 On Virtual Box
HackerSploit
100 Subscriber Q&A! - How I Learned Ethical Hacking
HackerSploit
BlackArch Linux Review - Better Than Kali Linux?
HackerSploit
How to Access the Deep Web Safely | Deep Web Starter Guide 1.0
HackerSploit
Wireshark Tutorial for Beginners - Installation
HackerSploit
Wireshark Tutorial for Beginners - Overview of the environment
HackerSploit
Wireshark Tutorial for Beginners - Capture options
HackerSploit
Wireshark Tutorial for Beginners - Filters
HackerSploit
Complete Ethical Hacking Course - Become a Hacker Today - #1 Hacking Terminology
HackerSploit
Complete Ethical Hacking Course #2 - Installing Kali Linux
HackerSploit
Parrot OS 3.5 Review | The Best Kali Linux Alternative
HackerSploit
Nmap Tutorial For Beginners - 1 - What is Nmap?
HackerSploit
Katoolin | How To Install Pentesting Tools On Any Linux Distro
HackerSploit
Nmap Tutorial For Beginners - 2 - Advanced Scanning
HackerSploit
Nmap Tutorial For Beginners - 3 - Aggressive Scanning
HackerSploit
Zenmap Tutorial For Beginners
HackerSploit
How To Setup Proxychains In Kali Linux - #1 - Stay Anonymous
HackerSploit
How To Setup Proxychains In Kali Linux - #2 - Change Your IP
HackerSploit
How To Change Mac Address In Kali Linux | Macchanger
HackerSploit
How To Setup And Use anonsurf On Kali Linux | Stay Anonymous
HackerSploit
Ubuntu 17.04 "Zesty Zapus" Review - Bye Unity
HackerSploit
VPN And DNS For Beginners | Kali Linux
HackerSploit
Tails OS Installation And Review - Access The Deep Web/Dark Net
HackerSploit
Steganography Tutorial - Hide Messages In Images
HackerSploit
The Lazy Script - Kali Linux 2017.1 - Automate Penetration Testing!
HackerSploit
Best Linux Distributions For Penetration Testing
HackerSploit
Netcat Tutorial - The Swiss Army Knife Of Networking - Reverse Shell
HackerSploit
Gaining Access - Web Server Hacking - Metasploitable - #1
HackerSploit
Web Server Hacking - FTP Backdoor Command Execution With Metasploit - #2
HackerSploit
How To Install Kali Linux On VMware - Complete Guide 2018
HackerSploit
Q&A #1 - Best Cyber-security Certifications?
HackerSploit
Terminator - Kali Linux - Multiple Terminals
HackerSploit
Shodan Search Engine Tutorial - Access Routers,Servers,Webcams + Install CLI
HackerSploit
Q&A #2 - Mr Robot?
HackerSploit
Metasploit Community Web GUI - Installation And Overview
HackerSploit
Linux Expl0rer - Forensics Toolbox - Installation & Configuration
HackerSploit
QuasarRAT - The Best Windows RAT? - Remote Administration Tool for Windows
HackerSploit
Metasploit For Beginners - #1 - The Basics - Modules, Exploits & Payloads
HackerSploit
Metasploit For Beginners - #2 - Understanding Metasploit Modules
HackerSploit
Kali Linux Quick Tips - #1 - Adding a non-root user
HackerSploit
Metasploit For Beginners - #3 - Information Gathering - Auxiliary Scanners
HackerSploit
Spectre Meltdown Vulnerability - How To Check Your System
HackerSploit
Metasploit For Beginners - #4 - Basic Exploitation
HackerSploit
ARP Spoofing With arpspoof - MITM
HackerSploit
WordPress Vulnerability Scanning With WPScan
HackerSploit
Generating A PHP Backdoor with weevely
HackerSploit
Nikto Web Vulnerability Scanner - Web Penetration Testing - #1
HackerSploit
How To Install Kali Linux On Windows 10 - Windows Subsystem For Linux
HackerSploit
Stacer - System Optimizer And Monitoring Tool For Linux
HackerSploit
Kali Linux 2018.1 - Kernel Updates & Patches
HackerSploit
MITM With Ettercap - ARP Poisoning
HackerSploit
Password Cracking With John The Ripper - RAR/ZIP & Linux Passwords
HackerSploit
How To Detect Rootkits On Kali Linux - chkrootkit & rkhunter
HackerSploit
Channel Updates - How To Post Questions & Video Suggestions
HackerSploit
Web App Penetration Testing - #1 - Setting Up Burp Suite
HackerSploit
Web App Penetration Testing - #2 - Spidering & DVWA
HackerSploit
Cl0neMast3r - GitHub Repository Cloning Tool
HackerSploit
Kali Linux On Windows 10 Official - WSL - Installation & Configuration
HackerSploit
DoS/DDoS Protection - How To Enable ICMP, UDP & TCP Flood Filtering
HackerSploit
Web App Penetration Testing - #3 - Brute Force With Burp Suite
HackerSploit
More on: Linux & CLI
View skill →Related Reads
📰
📰
📰
📰
Active Directory Enumeration & Password Spraying: A Hands-On Guide
Medium · Cybersecurity
The Quantum Internet Explained: How the Next Generation of Communication Could Be Unhackable
Medium · Cybersecurity
Zero Trust Starts Before Login: Lessons From Cloud Security
Medium · DevOps
Zero Trust Starts Before Login: Lessons From Cloud Security
Medium · Cybersecurity
🎓
Tutor Explanation
DeepCamp AI