Провека целостности пакетов в Debian / Ubuntu / RHEL / CentOS

linuxconfСегодня я продемонстрирую вам 2 команды  для Debian и Ubuntu, RHEL и CentOS, которые проверят целостность бинарных файлов в нашей Linux-системе. Способ описан в одном из последних номеров журнала Хакер.

Для чего это может понадобится вариантов множество, начиная от взломанной системы(когда какие-то бинарники модифицированы) и заканчивая просто “шаловливыми рученками” =).

Debian / Ubuntu

Установим пакет debsums, который содержит  md5-checksums:

sudo apt-get install -y debsums

Проверить систему можно командой:

sudo debsums -c

Итоговая команда для переустановки всех модифицированных бинарников для Debian-подобных систем будет выглядеть так:

sudo apt-get install -y --reinstall $(dpkg -S $(debsums -c) | cut -d : -d 1| uniq -u)

RHEL / CentOS

В красношапочной и ей подобных системах для поиска воспользуемся командой rpm:

sudo rpm -Va

Пример работы команды будет такой:

S.5....T c /var/lib/nfs/rmtab
S.5..... c /etc/libvirt/libvirtd.conf
S.5..... c /etc/libvirt/qemu.conf
S.5..... /etc/rc.d/init.d/libvirtd

Буквы и цифры в начале имеют свои значения, по которым можно определить что случилось с файлом:

  • S – изменился начальный размер файла;
  • M – изменились права доступа или режим;
  • 5 – отличается контрольная сумма md5
  • D – отличается старший/младший номер файла устройства;
  • L – изменился путь ссылки;
  • U – отличается владелец(пользователь) файла;
  • G – изменился владелец группы;
  • T – отличается время изменения файла;

Помимо этих флагов, через два пробела есть еще символы, которые могут означать тип файла:

  • c – файл конфигурации;
  • g – файлы, изначально отсутствующие в пакете;
  • d – файл документации
  • l – файл лицензии
  • r – файл readme

Итоговая команда для переустановки всех модифицированных бинарников для RHEL-подобных систем будет выглядеть так:

sudo yum reinstall -y $(rpm -qf $(rpm -Va | egrep "^S.{8} {4}.* | cut -d ' ' -f5) | uniq -u)

166 комментариев к “Провека целостности пакетов в Debian / Ubuntu / RHEL / CentOS

  1. Aw, this was an extremely nice post. Spending some time and actual effort to generate a really good article… but what can I say… I put things off a whole lot and don’t seem to get nearly anything done.

  2. There are some fascinating times in this article however I don?t know if I see all of them center to heart. There is some validity yet I will hold opinion until I consider it better. Good short article, many thanks as well as we want much more! Contributed to FeedBurner as well

  3. Hey! Someone in my Facebook group shared this site with us so I came to take a look.
    I’m definitely enjoying the information. I’m
    bookmarking and will be tweeting this to my followers! Wonderful blog and outstanding design.

  4. Undeniably believe that which you said. Your favorite reason seemed to be on the net the simplest
    thing to be aware of. I say to you, I certainly get irked while people think about worries
    that they plainly do not know about. You managed to hit
    the nail upon the top as well as defined out the whole thing without having side effect , people could take a signal.

    Will probably be back to get more. Thanks

  5. Hello, I think your site might be having browser compatibility
    issues. When I look at your website in Opera, it looks fine but when opening in Internet Explorer, it has some
    overlapping. I just wanted to give you a quick heads up!
    Other then that, excellent blog!

  6. I found your blog site on google and examine a few of your very early messages. Continue to maintain the excellent operate. I simply extra up your RSS feed to my MSN Information Viewers. Seeking ahead to reading more from you in the future!?

  7. I used to be very happy to find this net-site.I needed to thanks for your time for this excellent read!! I undoubtedly having fun with each little little bit of it and I have you bookmarked to check out new stuff you weblog post.

  8. Can I simply claim what a relief to discover a person that in fact understands what theyre discussing online. You most definitely recognize how to bring a concern to light as well as make it important. Even more individuals require to read this as well as recognize this side of the tale. I angle believe youre not much more preferred since you most definitely have the gift.

  9. There are certainly a great deal of details like that to take into consideration. That is a wonderful indicate raise. I supply the ideas over as basic ideas yet plainly there are inquiries like the one you raise where one of the most essential point will certainly be operating in truthful good faith. I don?t recognize if best techniques have emerged around things like that, however I make sure that your job is clearly identified as a level playing field. Both children and ladies really feel the impact of just a moment?s enjoyment, for the rest of their lives.

  10. A remarkable share, I just provided this onto a coworker that was doing a little analysis on this. And also he actually bought me breakfast due to the fact that I discovered it for him. smile. So let me reword that: Thnx for the reward! But yeah Thnkx for investing the moment to discuss this, I really feel strongly regarding it and enjoy finding out more on this subject. Preferably, as you become knowledge, would you mind upgrading your blog with even more details? It is very practical for me. Big thumb up for this post!

  11. I really like your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz respond as I’m looking to design my own blog and would like to find out where u got this from. thanks

  12. Hi there would you mind stating which blog platform you’re using? I’m going to start my own blog in the near future but I’m having a tough time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I’m looking for something unique. P.S Apologies for getting off-topic but I had to ask!

  13. Hi there! This article couldn’t be written much better! Looking through this post reminds me of my previous roommate! He always kept talking about this. I am going to send this information to him. Pretty sure he will have a very good read. Thanks for sharing!

  14. Today, I went to the beach front with my kids. I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is completely off topic but I had to tell someone!

  15. Fantastic blog you have here but I was wondering if you knew of any forums that cover the same topics discussed here? I’d really like to be a part of group where I can get advice from other knowledgeable individuals that share the same interest. If you have any recommendations, please let me know. Thanks!

  16. After study some of the blogs for your site now, we genuinely as if your technique for blogging. I bookmarked it to my bookmark web site list and you will be checking back soon. Pls consider my internet site likewise and tell me what you consider.

  17. Intimately, the post is really the greatest on this worthw hile topic. I match in with your conclusions and also will eagerly look forward to your next updates. Simply just saying thanks can not simply just be enough, for the great clarity in your writing. I will certainly instantly grab your rss feed to stay abreast of any kind of updates. Pleasant work and much success in your business endeavors!

  18. I?m impressed, I have to say. Truly hardly ever do I encounter a blog site that?s both enlightening and enjoyable, and let me inform you, you have actually struck the nail on the head. Your suggestion is superior; the concern is something that not nearly enough people are talking intelligently about. I am really happy that I came across this in my look for something connecting to this.

  19. Hmm it appears like your website ate my first comment (it was extremely long) so I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying your blog. I too am an aspiring blog blogger but I’m still new to everything. Do you have any suggestions for inexperienced blog writers? I’d genuinely appreciate it.

  20. I’m really enjoying the design and layout of your site. It’s a very easy on the eyes which makes it much more pleasant for me to come here and visit more often. Did you hire out a developer to create your theme? Great work!

  21. My developer is trying to convince me to move to .net from PHP. I have always disliked the idea because of the costs. But he’s tryiong none the less. I’ve been using Movable-type on a number of websites for about a year and am nervous about switching to another platform. I have heard very good things about blogengine.net. Is there a way I can import all my wordpress content into it? Any help would be greatly appreciated!

  22. I?m pleased, I need to state. Truly hardly ever do I experience a blog that?s both enlightening as well as enjoyable, and let me inform you, you have hit the nail on the head. Your concept is outstanding; the problem is something that insufficient individuals are talking wisely around. I am extremely pleased that I stumbled across this in my search for something connecting to this.

  23. Cool blog! Is your theme custom made or did you download it from somewhere? A theme like yours with a few simple tweeks would really make my blog jump out. Please let me know where you got your theme. Thanks

  24. Hi I am so delighted I found your site, I really found you by mistake, while I was searching on Askjeeve for something else, Nonetheless I am here now and would just like to say thanks for a tremendous post and a all round enjoyable blog (I also love the theme/design), I don’t have time to browse it all at the minute but I have saved it and also included your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the awesome work.

  25. Hey there! Someone in my Facebook group shared this website with us so I came to look it over. I’m definitely loving the information. I’m book-marking and will be tweeting this to my followers! Great blog and fantastic design and style.

  26. With havin so much content do you ever run into any problems of plagorism or copyright infringement? My site has a lot of unique content I’ve either authored myself or outsourced but it appears a lot of it is popping it up all over the internet without my agreement. Do you know any methods to help stop content from being ripped off? I’d truly appreciate it.

  27. Hey, I think your website might be having browser compatibility issues. When I look at your blog in Chrome, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, superb blog!

  28. Admiring the persistence you put into your site and detailed information you present. It’s nice to come across a blog every once in a while that isn’t the same old rehashed material. Fantastic read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.

  29. Greetings! Quick question that’s completely off topic. Do you know how to make your site mobile friendly? My website looks weird when browsing from my iphone4. I’m trying to find a template or plugin that might be able to fix this issue. If you have any suggestions, please share. Cheers!

  30. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

  31. Hi there! This post could not be written any better! Reading through this post reminds me of my good old room mate! He always kept chatting about this. I will forward this write-up to him. Pretty sure he will have a good read. Thanks for sharing!

  32. Have you ever thought about creating an e-book or guest authoring on other sites? I have a blog based on the same ideas you discuss and would really like to have you share some stories/information. I know my visitors would value your work. If you’re even remotely interested, feel free to shoot me an email.

  33. Hmm it seems like your website ate my first comment (it was super long) so I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog blogger but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d certainly appreciate it.

  34. Howdy would you mind letting me know which web host you’re utilizing? I’ve loaded your blog in 3 different web browsers and I must say this blog loads a lot faster then most. Can you suggest a good hosting provider at a reasonable price? Kudos, I appreciate it!

  35. Greetings from Los angeles! I’m bored to tears at work so I decided to check out your blog on my iphone during lunch break. I really like the knowledge you present here and can’t wait to take a look when I get home. I’m amazed at how quick your blog loaded on my mobile .. I’m not even using WIFI, just 3G .. Anyhow, excellent blog!

  36. Hi there just wanted to give you a quick heads up. The words in your article seem to be running off the screen in Chrome. I’m not sure if this is a formatting issue or something to do with web browser compatibility but I thought I’d post to let you know. The style and design look great though! Hope you get the issue resolved soon. Many thanks

  37. I don’t know whether it’s just me or if perhaps everybody else experiencing issues with your website. It appears as though some of the written text on your content are running off the screen. Can someone else please comment and let me know if this is happening to them too? This could be a problem with my internet browser because I’ve had this happen before. Thanks

  38. I love your blog.. very nice colors & theme. Did you design this website yourself or did you hire someone to do it for you? Plz reply as I’m looking to design my own blog and would like to find out where u got this from. appreciate it

  39. I do not know if it’s just me or if everyone else encountering issues with your website. It appears as if some of the written text on your posts are running off the screen. Can someone else please provide feedback and let me know if this is happening to them as well? This may be a problem with my internet browser because I’ve had this happen before. Kudos

  40. Hey, I think your site might be having browser compatibility issues. When I look at your website in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, amazing blog!

  41. I simply want to tell you that I am newbie to blogging and certainly loved your website. Likely I’m going to bookmark your website . You amazingly have terrific well written articles. With thanks for sharing your web site.

  42. A person essentially lend a hand to make critically posts I’d state. This is the very first time I frequented your website page and to this point? I surprised with the analysis you made to make this particular put up extraordinary. Magnificent activity!

  43. When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get several emails with the same comment. Is there any way you can remove me from that service? Bless you!

  44. Thanks for the sensible critique. Me & my neighbor were just preparing to do some research on this. We got a grab a book from our area library but I think I learned more from this post. I am very glad to see such fantastic info being shared freely out there.

  45. I simply want to tell you that I am just newbie to blogs and definitely loved you’re blog site. More than likely I’m likely to bookmark your website . You actually come with excellent posts. With thanks for sharing with us your website.

  46. It is appropriate time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I desire to suggest you few interesting things or suggestions. Perhaps you can write next articles referring to this article. I wish to read more things about it!

  47. The other day, while I was at work, my cousin stole my iphone and tested to see if it can survive a thirty foot drop, just so she can be a youtube sensation. My apple ipad is now destroyed and she has 83 views. I know this is completely off topic but I had to share it with someone!

  48. Having read this I thought it was rather informative. I appreciate you spending some time and energy to put this informative article together. I once again find myself personally spending way too much time both reading and leaving comments. But so what, it was still worthwhile!

  49. I needed to compose you that bit of remark to be able to give many thanks over again for the striking views you’ve documented on this website. It is quite particularly generous of you to make without restraint what some people might have offered as an e book in making some money for themselves, primarily considering that you could possibly have done it in the event you decided. These suggestions also worked to become a good way to realize that someone else have similar fervor just as my very own to grasp lots more concerning this issue. I am sure there are some more pleasurable situations up front for folks who take a look at your blog post.

  50. I’ve been surfing online more than 3 hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. In my view, if all webmasters and bloggers made good content as you did, the net will be much more useful than ever before.

  51. Its like you read my mind! You appear to know so much about this, like you wrote the book in it or something. I think that you can do with a few pics to drive the message home a bit, but other than that, this is wonderful blog. An excellent read. I’ll certainly be back.

  52. Oh my goodness! an incredible article dude. Thank you Nonetheless I am experiencing problem with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting an identical rss downside? Anyone who is aware of kindly respond. Thnkx

  53. Aw, this was a really nice post. In idea I want to put in writing like this additionally – taking time and actual effort to make a very good article… however what can I say… I procrastinate alot and in no way appear to get something done.

  54. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You definitely know what youre talking about, why throw away your intelligence on just posting videos to your site when you could be giving us something enlightening to read?

  55. Oh my goodness! Its like you understand my mind! You seem to know a lot about this, just like you wrote the book in it or something. I think that you can do with some pictures to drive the content home a bit, besides that, this is outstanding blog. A wonderful read. I will definitely return again.

  56. I blog frequently and I seriously thank you for your content. This great article has really peaked my interest. I am going to take a note of your blog and keep checking for new information about once per week. I subscribed to your RSS feed too.

  57. I would like to thnkx for the efforts you’ve put in writing this blog. I am hoping the same high-grade blog post from you in the upcoming as well. Actually your creative writing skills has encouraged me to get my own blog now. Really the blogging is spreading its wings fast. Your write up is a good example of it.

  58. Hey are using WordPress for your blog platform? I’m new to the blog world but I’m trying to get started and set up my own. Do you need any coding knowledge to make your own blog? Any help would be greatly appreciated!

  59. I’m impressed, I have to admit. Rarely do I come across a blog that’s both educative and interesting, and let me tell you, you have hit the nail on the head. The issue is something which too few people are speaking intelligently about. I’m very happy I stumbled across this during my hunt for something regarding this.

  60. Howdy I am so happy I found your blog page, I really found you by accident, while I was researching on Askjeeve for something else, Anyhow I am here now and would just like to say thanks a lot for a tremendous post and a all round entertaining blog (I also love the theme/design), I don’t have time to read it all at the minute but I have bookmarked it and also added in your RSS feeds, so when I have time I will be back to read much more, Please do keep up the awesome job.

  61. Good article. It’s very unfortunate that over the last decade, the travel industry has had to take on terrorism, SARS, tsunamis, bird flu, swine flu, plus the first ever true global tough economy. Through it the industry has really proven to be powerful, resilient and also dynamic, obtaining new approaches to deal with difficulty. There are usually fresh problems and chance to which the industry must again adapt and act in response.

  62. Hiya, I am really glad I have found this info. Nowadays bloggers publish only about gossips and web and this is really frustrating. A good site with interesting content, that is what I need. Thanks for keeping this site, I will be visiting it. Do you do newsletters? Cant find it.

  63. Its like you read my mind! You appear to know so much about this, like you wrote the book in it or something. I think that you could do with some pics to drive the message home a little bit, but other than that, this is magnificent blog. An excellent read. I will certainly be back.

  64. Hi! Quick question that’s totally off topic. Do you know how to make your site mobile friendly? My weblog looks weird when viewing from my iphone4. I’m trying to find a template or plugin that might be able to fix this problem. If you have any suggestions, please share. Thank you!

  65. I was very happy to uncover this web site. I wanted to thank you for your time for this fantastic read!! I definitely enjoyed every part of it and I have you book marked to see new things on your website.

  66. There are certainly a variety of details like that to take into consideration. That could be a nice point to deliver up. I supply the ideas above as general inspiration but clearly there are questions like the one you convey up the place the most important thing will be working in honest good faith. I don?t know if greatest practices have emerged around things like that, but I’m sure that your job is clearly identified as a fair game. Each boys and girls really feel the impact of only a second’s pleasure, for the rest of their lives.

  67. You are so interesting! I don’t think I’ve truly read through a single thing like that before. So wonderful to discover someone with some unique thoughts on this issue. Really.. thank you for starting this up. This site is one thing that is required on the internet, someone with a bit of originality.

  68. You can definitely see your skills within the paintings you write. The world hopes for even more passionate writers such as you who aren’t afraid to say how they believe. All the time follow your heart. “The point of quotations is that one can use another’s words to be insulting.” by Amanda Cross.

  69. Aw, this was a really nice post. In concept I wish to put in writing like this additionally ?taking time and precise effort to make a very good article?however what can I say?I procrastinate alot and by no means seem to get one thing done.

  70. Hey very cool site!! Man .. Beautiful .. Amazing .. I’ll bookmark your blog and take the feeds also…I am happy to find so many useful info here in the post, we need work out more strategies in this regard, thanks for sharing. . . . . .

  71. It is perfect time to make some plans for the future and it is time to be happy. I have read this post and if I could I desire to suggest you some interesting things or tips. Perhaps you can write next articles referring to this article. I wish to read more things about it! Miss Global warming

  72. Hey just wanted to give you a brief heads up and let you know a few of the pictures aren’t loading properly. I’m not sure why but I think its a linking issue. I’ve tried it in two different internet browsers and both show the same outcome.

  73. Thank you so much for giving everyone such a special chance to read articles and blog posts from here. It’s always so pleasant and also packed with amusement for me personally and my office acquaintances to search your website at minimum 3 times per week to study the new items you have got. And of course, we are usually impressed concerning the gorgeous ideas you give. Certain 2 points in this article are easily the most impressive we have had.

  74. Hi there! This blog post couldn’t be written any better! Looking through this post reminds me of my previous roommate! He always kept preaching about this. I will forward this information to him. Fairly certain he will have a very good read. Thanks for sharing!

  75. Howdy I am so grateful I found your webpage, I really found you by accident, while I was researching on Askjeeve for something else, Anyways I am here now and would just like to say thanks a lot for a remarkable post and a all round interesting blog (I also love the theme/design), I don’t have time to read through it all at the moment but I have bookmarked it and also added in your RSS feeds, so when I have time I will be back to read much more, Please do keep up the excellent job.

  76. Thank you a bunch for sharing this with all people you really recognize what you are talking approximately! Bookmarked. Kindly additionally discuss with my web site =). We will have a link alternate contract among us!

  77. Thanks for sharing excellent informations. Your website is so cool. I’m impressed by the details that you have on this web site. It reveals how nicely you understand this subject. Bookmarked this website page, will come back for extra articles. You, my pal, ROCK! I found just the information I already searched everywhere and simply could not come across. What a great website.

  78. Thanks for the write-up. I have continually observed that the majority of people are needing to lose weight simply because wish to show up slim and also attractive. However, they do not often realize that there are other benefits to losing weight also. Doctors insist that over weight people come across a variety of health conditions that can be perfectely attributed to their particular excess weight. The great news is that people that are overweight along with suffering from several diseases can help to eliminate the severity of their illnesses through losing weight. It is possible to see a slow but notable improvement in health when even a slight amount of fat loss is accomplished.

  79. Can I simply say what a relief to search out someone who really is aware of what theyre talking about on the internet. You positively know the way to bring a problem to mild and make it important. Extra people need to learn this and understand this aspect of the story. I cant consider youre not more well-liked since you definitely have the gift.

  80. Nice post. I find out something very complicated on various blogs everyday. Most commonly it is stimulating you just read content using their company writers and rehearse something from their website. I’d choose to use some with the content on my small weblog no matter whether you do not mind. Natually I’ll give you a link on the internet blog. Many thanks sharing.

  81. I was just seeking this info for some time. After six hours of continuous Googleing, at last I got it in your site. I wonder what is the lack of Google strategy that don’t rank this type of informative websites in top of the list. Generally the top web sites are full of garbage.

  82. I’m curious to find out what blog platform you happen to be working with? I’m having some minor security issues with my latest site and I would like to find something more secure. Do you have any suggestions?

  83. Greetings from Los angeles! I’m bored to tears at work so I decided to check out your blog on my iphone during lunch break. I enjoy the information you provide here and can’t wait to take a look when I get home. I’m surprised at how quick your blog loaded on my phone .. I’m not even using WIFI, just 3G .. Anyways, fantastic blog!

  84. Just want to say your article is as astounding. The clearness for your post is simply excellent and that i can assume you’re knowledgeable on this subject. Fine with your permission let me to clutch your feed to keep updated with approaching post. Thank you one million and please continue the enjoyable work.

Оставить ответ

Ваш адрес email не будет опубликован. Обязательные поля помечены *