user

By performing a penetration test, you gained access under a user account. During the test, you established a connection with your own machine via the SMB service and occasionally entered your login and password in plaintext. Which file do you have to clean to clear the password?

By performing a penetration test, you gained access under a user account. During the test, you established a connection with your own machine via the SMB service and occasionally entered your login and password in plaintext.
Which file do you have to clean to clear the password?

Option 1 : .bashrc
Option 2 : .bash_history
Option 3 : .profile
Option 4 : .XSession-log

1. .bashrc

The .bashrc file may be a script file that’s executed when a user logs in. The file itself contains a series of configurations for the terminal session. This includes fixing or enabling: coloring, completion, shell history, command aliases, and more.
It is a hidden file and straightforward ls command won’t show the file.

You can see the .bashrc command within the first column. The contents of .bashrc are often changed to define functions, command aliases, and customize the bash.
.bashrc file features a lot of comments that creates it easy to know .
To view the bashrc file:
$ cat .bashrc

Defining functions in bashrc

. bashrc are often wont to define functions that reduce redundant efforts. These functions are often a set of basic commands. These functions can even use arguments from the terminal.
Let’s define a function that tells the date during a more descriptive manner.
First you’ll got to enter the .bashrc enter editing mode.
$ vi .bashrc

2. .bash_history

File created by Bash, a Unix-based shell program commonly used on Mac OS X and Linux operating systems; stores a history of user commands entered at the command prompt; used for viewing old commands that are executed.
BASH_HISTORY files are hidden files with no filename prefix. They always use the filename .bash_history.
NOTE: Bash is that the shell program employed by Apple Terminal.
Our goal is to assist you understand what a file with a *.bash_history suffix is and the way to open it.
The Bash History file type, file format description, and Mac and Linux programs listed on this page are individually researched and verified by the FileInfo team. we attempt for 100% accuracy and only publish information about file formats that we’ve tested and validated.

3. .profile

.profile is for things that aren’t specifically associated with Bash, like environment variables PATH and friends, and will be available anytime. for instance , .profile should even be loaded when starting a graphical desktop session.

4. .XSession-log

If you would like to seek out more information a few problem during a session or want to repair it, consult the system log, which stores log data for your user session and applications.
The ~/.xsession-errors X session log file has been deprecated and is not any longer used.
On systemd-based systems, you’ll find the session log data within the systemd journal, which stores the info during a binary format. to look at the logs, use the journalctl command.
To view your user session logs:
1. Determine your user ID (uid) by running the subsequent command:
2. $ id –user
1000
3. View the journal logs for the user ID determined above:
$ journalctl _UID=1000
For more information on the systemd journal, see the journalctl(1) man page.

Learn CEH & Think like hacker


This Blog Article is posted by

Infosavvy, 2nd Floor, Sai Niketan, Chandavalkar Road Opp. Gora Gandhi Hotel, Above Jumbo King, beside Speakwell Institute, Borivali West, Mumbai, Maharashtra 400092

Contact us – www.info-savvy.com

https://g.co/kgs/ttqPpZ

Leave a Comment