Preview

Secure FTP Server in Chroot Jail Environment

Satisfactory Essays
Open Document
Open Document
280 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Secure FTP Server in Chroot Jail Environment
SFTP IN CHROOT

Often SFTP is confused with FTPS

Well, they are different SFTP - Part of SSH server FTPS - Secure implementation of FTP server
(yes, both use SSL encryption on the transport)

WHAT IS JAILROOT/CHROOT?

Evey process in *NIX systems has Process Context. This context contains the "absolute path" of the command that lead to creation of the process.

e.g.

$ ls

The Process Context shall contain "/bin/ls".

It must be noticed that process has visibility till "/". The hacker may somhow access all directories below "/" as they are in visibility. This is insecure.

We decrease the visibility of process by creating altogether a separate directory called CHROOT or JAILROOT.

For eg. if /dir1/dir2/chroot-dir is the JAILROOT directory in our configuration then the process run from login within this directory shall have no knowledge of anything above "/dir1/dir2/chroot-dir/". For this process /dir1/dir2/chroot-dir/ is their "/" in the process context.

CREATE USER WHO WILL BE ALLOWED TO LOGIN THROUGH SFTP

sage ~]# useradd sftp-user

Make sftp-server as login shell for that user.

sage ~]# usermod -s /bin/false sftp-user

CREATE JAILROOT DIRECTORY

sage ~]# mkdir /chroot-dir && chown root.sftp-user /chroot-dir && chmod 750 /chroot-dir

MODIFY SSH SERVER CONFIGURATION TO ENABLE SFTP IN CHROOT

sage ~]# vi /etc/ssh/sshd_config

#Subsystem sftp /usr/libexec/sftp-server
Subsystem sftp internal-sftp
ChrootDirectory /chroot-dir

ADD /usr/libexec/openssh/sftp-server AS A VALID LOGIN SHELL

sage ~]# echo '/usr/libexec/openssh/sftp-server' >> /etc/shells sage ~]# /etc/init.d/sshd restart

TEST SFTP

bash~$ sftp sftp-user@hostname.domain
Connecting to hostname.domain... sftp-user@hostname.domain's password: sftp> ls
sftp>

You May Also Find These Documents Helpful

  • Good Essays

    A Central Plant services all three major jail campus facilities—the Main Jail, North Annex, and South Annex—and nearly all jail support functions are located in the Main Jail.…

    • 600 Words
    • 3 Pages
    Good Essays
  • Better Essays

    Nt1310 Unit 4

    • 3614 Words
    • 15 Pages

    If the following program (myprog) is run from the command line as myprog 1 2 3, What would be the output?…

    • 3614 Words
    • 15 Pages
    Better Essays
  • Satisfactory Essays

    Answer: 2846338 involves privilege elevation, Vulnerability in Microsoft Malware Protection Engine Could Allow Remote Code Execution, and is a high priority.…

    • 290 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    Is418 Lab8

    • 309 Words
    • 2 Pages

    If you wanted to know which package a certain program belonged to, what command would you run?…

    • 309 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Unix processes are instances of an executed program. UNIX, being a multi task operating system handles thousands of processes at a time. We are able to check on what processes are currently running by typing ps at the UNIX prompt. Depending on the options used with the ps command, we can see different outcomes such as $ps -ef | more. This will list all the processes in the system. Some items you might see using the ps command are PID which is the process ID number, TT or TTY shows the controlling terminal for the process. If there is no controlling terminal then a question mark is used.…

    • 567 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Unit 3 network discovery

    • 1031 Words
    • 5 Pages

    What is the PID number? Why are these numbers useful when you run processes in the background? Which utility displays the PID numbers of the commands you are running?…

    • 1031 Words
    • 5 Pages
    Powerful Essays
  • Powerful Essays

    3220 final review

    • 655 Words
    • 4 Pages

    14. What type of attack can result in arbitrary code execution with system-level privileges? 134…

    • 655 Words
    • 4 Pages
    Powerful Essays
  • Powerful Essays

    Comp230-Intro to Scripting

    • 12553 Words
    • 51 Pages

    The Windows CLI command that is used to display the search path for the executable files is _________.…

    • 12553 Words
    • 51 Pages
    Powerful Essays
  • Satisfactory Essays

    It 250 Homework 4

    • 769 Words
    • 4 Pages

    2. What is a PID number? Why are these numbers useful when you run processes in the background? Which utility displays the PID numbers of the commands you are running?…

    • 769 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    2846338 involve privilege elevation, Vulnerability in Microsoft Malware Protection Engine Could Allow Remote Code Execution, and is a high priority.…

    • 552 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    School

    • 629 Words
    • 3 Pages

    Hackers typically follow a five-step approach to seek out and destroy targeted hosts. The first step in performing an attack is to plan the attack by identifying the target and learning as much as possible about it. Hackers usually perform an initial reconnaissance and probing scan to identify IP hosts, open ports, and services enabled on servers and workstations. In this lab, you planned an attack on 172.30.0.0/24 where the VM server farm resides, and used the Zenmap GUI to perform an “Intense Scan” on the targeted IP subnetwork.…

    • 629 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Four Types of Prsons

    • 302 Words
    • 2 Pages

    The four types of prisons are federal, state, municipal, and military. A federal prison is operated and managed by the government. Federal prisons normally house inmates who have been convicted of a crime in violation of a federal statue as opposed to a state or local laws. A municipal prison is a high security prison. A military prison is a prison operated by the military. Military prisons are used to house prisoners of war, enemy combatants, those whose freedom is deemed a national security risk by the military or national authority and member of the military found guilty of a serious crime. A state prison is a facility operated by a state and used to house and rehabilitate criminals. There is both minimum and maximum security prisons which are divided based on the nature of the crime committed by inmates at the institution. A total institution is an enclosed facility separated from society and physically where the inhabitants share all aspects of their daily lives. Total institutions are small societies and evolve their own distinctive values and styles of life and pressure residents to fulfill rigidly prescribed behavioral roles. Some of these places include prisons, concentrated camps, mental hospital, seminaries, and other facilities in which individuals are cut off from society forcibly or willingly. Jails play an important role in the criminal justice system because it keeps offenders that committed a crime off the streets. Jails also help our community to be safe and there would be less violence. Jails are used as a form of punishment either short-term or long-term depending on how severe of the crime. Without jails in the criminal justice system crimes will be overrated and individuals that break the law will receive no punishments and will keep committing the crimes over and over…

    • 302 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    Stories mentioning jails are throughout history even back to biblical times, however, America did not have an official penitentiary until 1790 at which time Philadelphia constructed the Walnut Street Jail. It was during this time that the root word of penitentiary took on its new form. Prisoners in early times were sent with the aim of the punishment in the form of penance, thus with any luck resulting in purity of personal reform. Inmates are kept in single cell units at all-times, even for meals. Recreation was not an option. In the rare event, that an inmate did leave the cell, a mask, or hood is required (Johnson & Dobrzanska, 2005). The goal is to lead a monk style life, thus providing a Bible to all inmates is mandatory, and it is a hope that the offenders would spend their sentences preparing to live law-abiding lives as governed by God 's word, following their release. This type of containment for inmate is known as the separate system.…

    • 1589 Words
    • 7 Pages
    Better Essays
  • Satisfactory Essays

    Prison Classification

    • 434 Words
    • 2 Pages

    Inmates first experience usually occurs in a classification or reception center, where they are given a battery of psychological and intelligence tests and are evaluated on the basis of their background, offense history, personality, and treatment needs. Some states have instituted rigorous classification instruments designed to maximize the effectiveness of placements, thereby cutting down on the cost of incarceration. Prison classification is a method of assessing inmate risks that balances the security needs of the institution with treatment needs the individual. Effective classification can reduce prison infractions and create a safer environment of both inmates and staff. External classification places an inmate at a custody level that will determine where he or she will be housed, internal classification determines the cell or housing unit, as well as the facility programs to which the prisoner will be assigned. External classification systems are now being used in all Federal and state prison systems in the United States. Internal classification systems focus on those decisions that are made for the incoming prison population.…

    • 434 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    If you type only the programs's executable filename, Windows 95/98 or Windows Me searches the current folder, and then the folders on the path statement for the executable file. If the file is not found, you receive the following error message:…

    • 474 Words
    • 2 Pages
    Good Essays