Skip to content

GetCyber

Dan & Tamara

  • ALL
  • KALI
  • DEBIAN
  • WEB
  • MORE
    • MACOS
    • WINDOWS
    • QUICK HACKS
    • BLOGS
  • 📺 YOUTUBE VIDEOS
  • 🤓 ABOUT
    • 🗓️ EVENTS
    • 📩 CONTACT

- Live Fri & Sat on YouTube!

Recent Posts

  • Manipulating and Filtering Content in LinuxMarch 2, 2023
  • Appointment – Starting Point – Hack The Box // Walkthrough & SolutionFebruary 28, 2023
  • Sequel – Starting Point – Hack The Box // Walkthrough & SolutionFebruary 28, 2023
  • Crocodile – Starting Point – Hack The Box // Walkthrough & SolutionFebruary 28, 2023
  • Exposed: The Insidious Linux Backdoors You Never Knew ExistedFebruary 25, 2023
NEWSLETTER SIGN UP!

Recent Comments

  1. Benimaru on PIECE of cake – Install Metasploitable 2 on VirtualBoxJune 3, 2023

    Metasploitable.vmdk file is not listing in the storage tab. There is only one parent tab called "Controller:SATA" inside which two…

  2. Lauren Jones on Installing Kali Linux on Android using NetHunter and TermuxMay 26, 2023

    You're getting a "Permission denied" error because you're trying to execute a file that does not have execution permissions. The…

  3. Shadow on Installing Kali Linux on Android using NetHunter and TermuxMay 21, 2023

    Hello. I found Dan (the man) Duran while having an issue with kali on bare metal having a connectivity issue.…

  4. Shadow on Installing Kali Linux on Android using NetHunter and TermuxMay 21, 2023

    Hello. I found Dan (the man) Duran while having an issue with kali on bare metal having a connectivity issue.…

  5. Muhammad Asif on Why is my Kali Linux not connecting to Wi-Fi? 😱 // 100% Problem FIXED!May 6, 2023

    Hey Mate. I am a bigger in Kali Linix console. I am using MacBook pro. Downloaded and running fine via…

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • August 2022
  • June 2022
  • April 2022
  • March 2022
  • November 2021
  • October 2021

Author: Dan Duran

Manipulating and Filtering Content in Linux

Posted on March 2, 2023 - March 2, 2023 by Dan Duran

Knowing Linux/Unix commands for manipulating and filtering content in a file can save time, increase efficiency, and provide a flexible and reproducible way to work with file data.

Knowing these commands for manipulating and filtering content in a file can be very useful for several reasons:

  • Efficiency: When working with large files, it can be time-consuming to manually edit or search through the file for specific content. Unix commands provide efficient ways to automate these tasks.
  • Reproducibility: Using Unix commands to manipulate and filter content in a file creates a clear and repeatable process that can be easily applied to similar files in the future.
  • Flexibility: Unix commands can be combined in many ways to achieve different goals, making them a flexible tool for a wide range of tasks.
  • Compatibility: Unix commands are available on most Unix-based systems, including Linux and macOS, so knowledge of these commands can be helpful when working on different systems.

Let’s begin:

Copy Code Copied Use a different Browser

cat file.txt | grep '^-*' > file2.txt

This command is using the cat and grep commands to filter content from a file and save the result to a new file. Here’s what each part of the command does:

  • cat file.txt: This command prints the contents of file.txt to the terminal.
  • |: This is a pipe symbol, which sends the output of the cat command to the next command (grep in this case) as input.
  • grep ‘^-*’: This command uses the grep tool to search for lines that start with one or more hyphens (-). The ^ symbol matches the beginning of the line, and the – symbol is enclosed in square brackets to indicate that it is a literal character to match. The * symbol indicates that there may be zero or more hyphens after the initial one.
  • > file2.txt: This command redirects the output of the grep command to a new file called file2.txt. If file2.txt already exists, it will be overwritten with the new content.

More cool commands

Extracting lines containing a specific keyword and saving them to a new file:

Copy Code Copied Use a different Browser

grep "keyword" file.txt > new_file.txt

Counting the number of occurrences of a specific word in a file:

Copy Code Copied Use a different Browser

grep -o "word" file.txt | wc -l

Removing blank lines from a file:

Copy Code Copied Use a different Browser

sed '/^$/d' file.txt > new_file.txt

Removing leading and trailing whitespaces from lines in a file:

Copy Code Copied Use a different Browser

sed 's/^[ \t]*//;s/[ \t]*$//' file.txt > new_file.txt

Extracting a range of lines from a file:

Copy Code Copied Use a different Browser

sed -n 'start_line,end_linep' file.txt > new_file.txt

Sorting a file by a specific column:

Copy Code Copied Use a different Browser

sort -k column_number file.txt > new_file.txt

Removing duplicates from a file:

Copy Code Copied Use a different Browser

sort file.txt | uniq > new_file.txt

Reversing the order of lines in a file:

Copy Code Copied Use a different Browser

tac file.txt > new_file.txt

Extracting a specific column from a file:

Copy Code Copied Use a different Browser

cut -f column_number file.txt > new_file.txt

Replacing a specific word or pattern in a file:

Copy Code Copied Use a different Browser

sed 's/old_word/new_word/g' file.txt > new_file.txt

Counting the number of lines in a file:

Copy Code Copied Use a different Browser

wc -l file.txt

Extracting lines containing a pattern and the lines immediately before and after:

Copy Code Copied Use a different Browser

grep -A num_lines_after -B num_lines_before "pattern" file.txt > new_file.txt

Extracting lines that match multiple patterns:

Copy Code Copied Use a different Browser

grep -E "pattern1|pattern2" file.txt > new_file.txt

Sorting a file numerically by a specific column:

Copy Code Copied Use a different Browser

sort -n -k column_number file.txt > new_file.txt

Merging two sorted files into a single sorted file:

Copy Code Copied Use a different Browser

sort file1.txt file2.txt > merged_file.txt

Extracting a random sample of lines from a file:

Copy Code Copied Use a different Browser

shuf -n num_lines file.txt > new_file.txt

These are just a few more examples of Unix commands that can be used to manipulate and filter content in a file. There are many other useful commands that can be combined in different ways to achieve specific goals.

Cheers!

Dan D.

Posted in DEBIAN LINUX, KALI LINUX, KNOWLEDGE BASE, QUICK HACKSLeave a comment

Appointment – Starting Point – Hack The Box // Walkthrough & Solution

Posted on February 28, 2023 by Dan Duran

This box allows us to try conducting a SQL injection against a web application with a SQL database.

SQL Injection is a typical method of hacking web sites that collect and store user input data using SQL Statements.

SQL injection attacks are a sort of cyber assault in which vulnerabilities in online applications that employ SQL (Structured Query Language) databases are exploited. An SQL injection attack occurs when an attacker uses malicious input to influence the SQL query that the programme is executing, enabling the attacker to access or change sensitive data contained in the database.

SQL injection attacks often involve introducing SQL code into user input areas like search boxes or login forms to fool the programme into performing undesired database instructions.

An attacker, for example, may inject malicious code into a search box that obtains all user data from a database rather than only the data linked to the search query.

SQL injection attacks that are successful may cause a variety of security vulnerabilities, such as unauthorized access to sensitive data, data modification or deletion, or the ability to execute arbitrary instructions on the application’s underlying server. Web developers should use best practises such as input validation and parameterized queries to avoid SQL injection attacks, and maintain their software up to current with the latest security updates.

Posted in Hack The Box, KALI LINUX, VIDEOSLeave a comment

Sequel – Starting Point – Hack The Box // Walkthrough & Solution

Posted on February 28, 2023 by Dan Duran

In the last video, we got a little experience with SQL injections. We learnt how a web application may use a database of some kind to authenticate users and how it might be abused if not set correctly.

In this box, we go a little further logging into mysql and looking at the databases and tables.

Posted in Hack The Box, KALI LINUX, VIDEOSLeave a comment

Crocodile – Starting Point – Hack The Box // Walkthrough & Solution

Posted on February 28, 2023 by Dan Duran

In this box, the target computer has a weak access control vulnerability that allowed active user credentials to be harvested through FTP.

The same credentials might be used to access a restricted area of the online application.

FTP (File Transfer Protocol) attacks target FTP servers and clients. FTP is a popular protocol for transferring files over the internet, and it is often used by corporations and organizations to distribute huge data across several sites.

An attacker may employ a variety of FTP techniques to compromise an FTP server or client. Among the most frequent are:

Brute force attacks: A brute force attack occurs when an attacker use automated tools to attempt to guess the FTP login credentials (username and password) by continually attempting various character combinations.

Packet sniffing attacks include capturing and analyzing network communication between an FTP client and server in order to acquire login passwords or other sensitive data.

FTP bounce attacks: In an FTP bounce attack, an attacker uses a weak FTP server to relay instructions to other servers, so indirectly attacking another server or network.

Attackers may also exploit weaknesses in the FTP protocol to execute arbitrary code, upload or download data, or gain unauthorized access to the server.

It is critical to utilize strong FTP login passwords, maintain FTP servers and clients up to current with the latest security updates, and monitor network traffic for signals of unusual behaviour to avoid FTP compromises. Encryption and secure file transfer protocols, such as SFTP or FTPS, may also aid to secure FTP file transfers.

Posted in Hack The Box, KALI LINUX, VIDEOSLeave a comment

Exposed: The Insidious Linux Backdoors You Never Knew Existed

Posted on February 25, 2023 - February 26, 2023 by Dan Duran

Sneaky – Backdoors are secret pieces of code, scripts, or programs installed on a system for the main goal of maintaining persistence.

They provide hackers with faster and more immediate access to the system.

Your job as a pen-tester or ethical hacker in a red team scenario or a system administrator and defender in a blue team, is to guarantee that your organization’s IT infrastructure runs smoothly and securely.

In this video, you’ll learn about the top five persistence tactics that attackers use to install and maintain backdoors on Linux computers.

You’ll be able to detect and remove backdoors before they do any damage to your systems if you understand these tactics. In addition, you’ll develop a greater awareness of the security risks associated with different Linux-based tools and applications, allowing you to make more educated choices about how to setup and safeguard your systems.

You will be more prepared to secure your organization’s Linux-based systems against backdoors and other sorts of threats after seeing this video.

You’ll learn vital information and skills that will assist you in identifying and resolving security problems, as well as making educated choices about how to setup and safeguard your systems in the future.

Don’t miss out on this important information; watch the video now to keep ahead of the curve when it comes to Linux system security!

Posted in DEBIAN LINUX, KALI LINUX, VIDEOSLeave a comment

Hackers Beware: 10 Steps to Uncover Hackers on Your Linux System!

Posted on February 22, 2023 - February 26, 2023 by Dan Duran

The main goal of a hacker is to breach into computer and servers and take sensitive information from the system.

Most hackers take precautions while engaging in hacking operations and constantly strive to avoid getting detected.

After the system has been infiltrated, the hacker will always install a backdoor to continue access. Today I will show you how to check whether or not your linux machine, computer or server, has been hacked.

Every hacker leaves some evidence; it is up to the you to discover the evidences left behind.

If your machine or server is hacked, it will undoubtedly act in some way at some point. There are a few basic tests we can conduct on our linux computer to determine whether or not the linux system has been hacked.

To fast audit your Linux system, follow this step-by-step tutorial. I hope this helps!

Posted in DEBIAN LINUX, KALI LINUX, VIDEOSLeave a comment

oH No! I Messed Up My Windows Defender Firewall! – FIX RDP & SMB Issues

Posted on February 20, 2023 - February 26, 2023 by Dan Duran

I was doing a Kali Linux pen-testing tutorial and I made am oopsie! For some reason I clicked on restore windows defender firewall and everything went to heck. My RDP and SMB connections were lost!

So I decided to take a video and should you how I was able to troubleshoot my connection problems.

Now keep in mind that I’m not a SysAdmin but I come form the network side so that’s the first thing I looked for.

Tell me if I did ok!

When a desktop’s connection to its host breaks, it’s time to do some remote desktop troubleshooting. If a remote desktop is not functioning, check firewalls, permissions, and other factors.

Posted in DEBIAN LINUX, KALI LINUX, VIDEOS, WINDOWSLeave a comment

Python3 Simple HTTP Server is f****ng Amazing! Kali Linux and Windows Install

Posted on February 19, 2023 - February 26, 2023 by Dan Duran

You can quickly and easily host and serve your own files with the help of the Simple HTTP Server python3 module.

The primary benefit of python’s Simple HTTP Server is that it does not need any further installation beyond the python interpreter. Python interpreters are readily available in almost all operating systems including Kali Linux and Windows, so you won’t have to worry about hosting!

It’s easy to get going in the folder where your sharable files are stored. In this video, I show you how launch the web server on Kali Linux and Windows OS.

Posted in DEBIAN LINUX, KALI LINUX, VIDEOSLeave a comment

Mongod – Starting Point – Hack The Box // Walkthrough & Solution

Posted on February 15, 2023 - February 28, 2023 by Dan Duran

HTB’s Mongod box was a tricky one! Hack the Box throws a curve ball by adding the Mongo switch pretty() at the end of the submission string. Since I’m not a Mongo expert, it took me a while to find the command.

I don’t think pretty() is a common Mongo command. Maybe I’m wrong!

Mongod is part of the HTB Starting Point, Tier 0: “Learn the Basics of Penetration Testing.”

Posted in Hack The Box, KALI LINUX, VIDEOSLeave a comment

Synced – Starting Point – Hack The Box // Walkthrough & Solution

Posted on February 14, 2023 - February 28, 2023 by Dan Duran

Today I’m coming back to squash the Starting Point, Tier 0, with Synced! Starting Point is for learning the basics of pen-testing and cyber security, and what better way to do it than by discovering Linux RSYNC, a wonderful native tool for moving data from server to server.

The Linux-based program Rsync may be used to synchronize data across distant and nearby servers. In order to customize the connections you establish, Rsync provides a wide variety of settings. You have complete control over the parameters of an rsync transfer, from the shell to be used to the exclusion of certain files.

If not configured properly, rsync can be a detriment to cyber security and this is what Hack The Box tries to teach you as a pen tester.

I hope you enjoy it!

Posted in Hack The Box, KALI LINUX, VIDEOSLeave a comment

Posts navigation

Older posts

Copyright ©2023 GetCyber

Click to Copy