New FAMILUG

The PyMiers

Wednesday 31 May 2017

apt changelog và wannacry

Wannacry làm mưa làm gió trên "cộng đồng mạng" của các "Windows" user.
Dùng Linux/OSX, bạn sẽ không quan tâm lắm...

Sau Wannacry, người ta lại phát hiện ra một lỗ hổng của Samba và đặt tên là "Sambacry",
lỗ hổng này cho phép một user không có quyền root nhưng có thể chạy các chương trình như root.
Vì vậy nó cũng được coi như một lỗ hổng rất nghiêm trọng.
Ubuntu ngay lập tức ra bản fix cho lỗ hổng này.


Trên Ubuntu 16.04, package sau khi đã fix có phiên bản là: released (2:4.3.11+dfsg-0ubuntu0.16.04.7)

Câu lệnh `apt-get changelog samba` giúp ta lấy thông tin thay đổi của package:


$ apt-get changelog samba | less
Get:1 http://changelogs.ubuntu.com samba 2:4.3.11+dfsg-0ubuntu0.16.04.7 Changelog [318 kB]
samba (2:4.3.11+dfsg-0ubuntu0.16.04.7) xenial-security; urgency=medium
  * SECURITY UPDATE: remote code execution from a writable share
    - debian/patches/CVE-2017-7494.patch: refuse to open pipe names with a
      slash inside in source3/rpc_server/srv_pipe.c.
    - CVE-2017-7494
 -- Marc Deslauriers <marc.deslauriers@ubuntu.com>  Fri, 19 May 2017 14:18:13 -0400
samba (2:4.3.11+dfsg-0ubuntu0.16.04.6) xenial-security; urgency=medium
  * SECURITY REGRESSION: follow symlinks issue (LP: #1675698)
    - debian/patches/CVE-2017-2619/bug12721-*.patch: add fixes from Samba
      bug #12721.
  * Add missing prerequisite for previous update
    - debian/patches/CVE-2017-2619/bug12172.patch: handle non-existant
      files and wildcards in source3/modules/vfs_shadow_copy2.c.

...

Thông tin changelog ở trên cho thấy bug đã fix trong bản 2:4.3.11+dfsg-0ubuntu0.16.04.7, nó fix CVE-2017-7494, chỉ cần upgrade lên bản mới nhất là được.

Samba là gì mà lắm người dùng vậy?
$ apt-cache show samba 
 ... SMB/CIFS file, print, and login server for Unix
 Samba is an implementation of the SMB/CIFS protocol for Unix systems,
 providing support for cross-platform file and printer sharing with
 Microsoft Windows, OS X, and other Unix systems.  Samba can also function
 as an NT4-style domain controller, and can integrate with both NT4 domains
 and Active Directory realms as a member server.

Nó cơ bản là 1 file server để chia sẻ file giữa các máy, xuất phát từ Windows. Để chia sẻ với các máy Windows nếu bạn dùng Linux/OSX, bạn sẽ phải dùng giao thức SMB, mà samba là phiên bản thực hiện công việc này trên Linux/OSX.
Có rất nhiều cách khác để chia sẻ file giữa các máy: như FTP, NFS, webDAV ...

Tham khảo
https://www.reddit.com/r/linux/comments/2f83x6/filesharing_over_lan_with_android_ftp_vs_sftp_vs/
https://www.samba.org/samba/docs/man/Samba4-HOWTO/protocol.html
https://unix.stackexchange.com/questions/367138/wannacry-on-linux-systems-how-do-you-protect-yourself?newsletter=1&nlcode=161981%7c0930

Hết.
HVN at http://www.familug.org/ and http://pymi.vn

Đăng ký học lập trình #Python 3 từ con số 0 tại PyMI.vn - lớp Hà Nội khai giảng mùng 1 tháng 6, lớp Sài Gòn khai giảng đầu tháng 8. Xem chi tiết tại https://pymi.vn/ #PyMI #PyFML
Đăng ký học #Linux #Sysadmin http://sysad101.pymi.vn/

No comments:

Post a Comment