Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jul 2007
    Posts
    26

    Default Quesion about ln command ?

    hello

    for security reason i make ln command with permission 700 and i chatter +i the file located /bin/ln

    the question is , it this security i made will be effect in ANY functions about cpanel work , update , etc ....?

    thanks

  2. #2
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    There is a balance between securing things and breaking your server ...

    'ln' is one of these functions that sits right on the line.

    For this reason, I do not recommend locking it down or more accurately setting it root access only as there are a number of processes I can think of immediately that you would break on Cpanel servers.

    Instead of completely locking access, you might want to consider
    replacing it with a wrap shell to log and control user access better.

  3. #3
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel/Enkompass Access Level

    DataCenter Provider

    Lightbulb

    I recommend avoiding any use of the immutable attribute; using the immutable bit can and will lead to difficulties that may not be immediately evident from the start, including non-cPanel-related activity such as normal OS updates (that may need to update the "ln" binary) or other 3rd-party script installation functions (that may need to create symlinks using "ln").

    Just to note: I've relocated the thread into the cPanel and WHM Security forums so that it may receive more attention and relevant discussion.

  4. #4
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Actually there is purpose to setting the immutable flag ...

    It prevents general updates from blowing away the locked down permissions so in this case the +i that the user spoke of would be
    specifically to block the very updates you described.

    Now with that said, if the user sets that flag, it would also be their
    additional responsibility to make the necessary updates manually
    as new updates or patches are released.

    One way to minimize the need for this though is to stay current
    with the newest and very latest version of whatever command
    you have locked down and set immutable. Most Linux flavors
    stay somewhat behind on component versions behind the actual
    versions currently available if you manually download the origin
    source and compile yourself verses grabbing them from yum.

    In this particular case, I would grab the newest source for the
    commands the user spoke of and get that well updated before
    locking down the command.

  5. #5
    Member
    Join Date
    Jul 2007
    Posts
    26

    Default

    nobody ask me why i would make permission like this ?

    because hackers able to read files with ln command instead of cat or pic or the other read command , ln command make a shourtcut for files exists in the server , or files want to read it specific , for example /etc/passwd

    all this operations running under perl scripts ,

    there is two CIRTICAL bugs in file manage so had to disable file manager for the whole server

    the first server in the frontpage

    u may want to check the following link to see how can bypass to server
    bypass safe mode cpanel exploit on Frontpage


    the 2nd bug want to talk about is the file manager bypass with rar ext

    if u disable perl , they make the commands they want in another server have perl enabled , then they tar or compress the command that was in text file and download it , upload it to the server that have perl disable and extract it , and surprise !!!

  6. #6
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Lightbulb

    I don't know about you but I just simply wrote my own "ln" command!

    Mine doesn't allow any symlinks to /etc/passwd or related and does
    not allow symlinks be setup inside hosting accounts or to system files
    unless explicitly done so by root. It also logs all symlink attempts.

    Aside from that, it looks, functions, and operates like regular "ln".

    Anyway, the point is other than permission changes, you might
    consider replacing the commands.

    Ironically this is actually a hacker technique normally used to compromise
    a system being used instead to protect it.

Similar Threads & Tags
Similar threads

  1. Quesion about ln command ?
    By assassin85 in forum New User Questions
    Replies: 1
    Last Post: 10-21-2009, 10:59 AM
  2. suversion quesion
    By shann in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-21-2007, 11:12 AM
  3. SSL over POP3 , FTP, HTTP quesion
    By shann in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-17-2006, 12:09 PM
  4. Resolver quesion
    By shann in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 07-10-2006, 11:25 AM
  5. Email notification quesion in control panel
    By shann in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-16-2004, 03:54 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube