KategorilerKaliLinuxUncategorized

How To Install OS In The External Harddisk

When I started my first job in my career. I have got two laptops. One of them is that I don’t like this laptop but it is working good. is my company gave.

More than 1 month later. I ran into a problem. I have to go to my office with two laptops. Finally I solve my problem with a device.

Device is Samsung T7 ssd

Samsung T7 at Amazon

I install ubuntu via Vmware. I show the configuration Vmware Image.

My Vmware Image is the below.

You must connect the device While The image run.

You have the question about this.

Feel free send a message.

Kategoriler$PATHKaliSuid Bit

Misconfiguration $PATH environment

$PATH variable is specified to set the file executable file where to located. For example, when we use the ls command we don’t have a to use the full paths ls command. Sometrimes it can be dangerous this situtation because it is a security problem if it is made misconfiguration.

We try to make an example to show the vulnerability. We create a c file as named misconfiguration Binary. c. We assume this file is created file incorrectly.

We complie a c file with gcc.

We change compiled file a.out to misconfigurationBinary.c

We are configuring the suid bit on file.

We create exploit named ls because we abuse ls command and we have to make ls name the file because we will add /tmp file in $PATH enviroment variable for the reason that $PATH variable look current directory firstly to run command. We use Shebang (!#) to execute file without python3. Thus, we add first command.

#!/usr/bin/python3

We give the file execution permission.

We add tmp file in $PATH environment variable with export command.

 export PATH=<the path you want to add>:$PATH

We run missconfigurationBinary and we get root.

KategorilerKali

Create a User By hand

we can add user with “useradd” command but also it is possible to create a user by hand. Therefore I try to add a user by hand.

firstly we edit /etc/passwd file with vipw. “vipw” provides secure editing.

run vipw to write etc/passwd

Edit /etc/passwd

simple information about /etc/passwd

we create user as named d and we assign group id as its id 1007.

create a user in etc/passwd

Edit /etc/group

simple information about /etc/group

we write group id /etc/group. We open the file to write operations with vigr that edit /etc/group

create a group in etc/group

we create directory that used for new user d with mkdir command in under the home directory.

create directory as named d

we copy etc/skel directory under d directory.

copy operation

With chown command, we change the users and groups of those under the d file.

change of belonging

we change file privileges

group and other is assigned all privilige except write

Add new password

new password for d