safety for anything you connect to the Internet is important. think of these devices as doorways. They either allow access to services or supplies services for someone else. Doorways need to be safe — you wouldn’t leave your door unlocked if you lived in the bad part of a busy city, would you? Every Internet connection is the bad part of a busy city. The thing is, building hardware that is connected to the Internet is the new hotness these days. So let’s walk through the basics you need to know to start thinking safety with your projects.
If you have ever run a server and checked your logs you have probably observed that there is a lot of automated traffic trying to get access to your server on a nearly constant basis. An insecure device on a network doesn’t just compromise itself, it presents a risk to all other networked devices too.
The easiest way to safe a device is to turn it off, but lets presume you want it on. There are lots of things you can do to secure your IoT device. It may seem daunting to begin with but as you start becoming a lot more safety conscious things begin to click together a bit like a jigsaw and it becomes a lot easier.
What are the problems and how do you fix them?
Passwords and Password Security
Before we start always remember to change default passwords for every package and device you use. This is the first thing you must make with any connected device. web safety hinges on two goals: keeping the unauthorized from getting access to resources and ensuring the authorized have access to resources they need. If your device supplies different information to different people you will need to have some way for your device to tell people apart, for example a login system. This can be achieved in many different ways like using session ID’s and secure cookies in conjunction with passwords.
It’s very crucial that you do not store passwords or session ID’s in cookies as these can easily be intercepted either by man in the middle attacks, malware or someone who has physical access to the end user’s computer. Passwords must always be hashed. This is a one way process and cannot be reversed if done appropriately using “salting”. Salting is using a string of characters so when you hash the password the salt is used to create a special hash. This stops attackers using rainbow tables in buy to crack your passwords if they got a hold of your database. Pedro Umbelino did a great job of detailing password safety in his Hackaday post a few weeks back.
Secure Salting of password hashes is the way to go in this digital age click the link to learn more. Passwords are crucial and it’s best that even you don’t know your users passwords as they may use them for other accounts. If you just encrypted them then you have the indicates to decrypt them as encryption is a two way process encrypt/decrypt. This is why we hash and don’t encrypt.
Old software with known Vulnerabilities
ATMs are notorious for lagging behind on software updates. This makes them easy targets.
It’s obvious, but well worth saying. avoid using old software with known vulnerabilities, never use older versions of software. software is updated for a valid reason. use the most recent versions, even if the changelog doesn’t mention certain safety patches.
There are web sites out there that paper most known vulnerabilities and this is worth checking out for packages you plan to use. You may be thinking that providing all known vulnerabilities is helping the bad guys, but these are actually the good guys. yes it does help a would-be attacker find a way to attack older web scripts or software but if you use the current version from a trusted vendor they will hopefully have fixed any previous problems they had with their product. providing the vulnerabilities gives companies a reason to get updates out the door and to stop attackers preying on software with bugs in it because your software vendor is lazy. It also helps developers avoid the worst offenders.
If You Don’t need It, Why keep It?
Lets assume your device is running some form of Linux. There are lots of protocols you can use to communicate with the device. For example you may have SMB, SSH, Telnet, FTP, VNC etc. but you need to decide which of these protocols you need and which you don’t. If you don’t use a protocol why have it enabled in the first place?
These are like doorways to your device the less doorways you have the less attack avenues a computer “hacker” has to get access. It’s common sense really but is often overlooked. another good bit of recommendations is to disable root login for SSH and create another account to use. Your root account is the most likely to be brute-forced. If you need remote login use at least 8 digit passwords and make it random and odd chars, capitals, numbers etc. If you use a word and maybe 123 at the end, It would take a hacker literally minutes with a dictionary brute force attacك.
التخلي عن الكثير من المعلومات
تعريض المعلومات التي قد تساعد في تشكيل المهاجم نموذجا أكثر تعقيدا هو رقم كبير لا. قد يكون خادم IOT الخاص بك تقديم معلومات أكثر بكثير مما كنت تعتقد أو حتى المعلومات التي لم تشعر أنها مهمة.
على سبيل المثال، قد تربط مواقع الويب المكتوبة ذاتيا مباشرة بالملفات الموجودة على الخادم بدلا من إخفاء موقعها الفعلي. يجب تجنب ذلك. لديك “دليل الويب” لسبب ما؛ يتوقع برنامج جهازك أن تكون ملفاتك في هذا المكان وأعلى أذونات لإيقاف الوصول إلى ما بعد هذا الدليل. لا تفتح النهاية الخلفية (جزء غير HTTP) لأن هذا قد يتسبب في الحصول على امتياز مهاجم من خلال خطأ أساسي في برنامج نصي ويب في ما يقصد منه أن يكون جزءا آمنا من جهازك.
لا تقلق كثيرا حول هذا الأمر كما هو شيء تافه للغاية لإصلاحه. ما زلت بحاجة إلى استخدام دليل الويب الخاص بك ولكن يمكنك أيضا إخفاء URL باستخدام .htaccess مع خادم Apache HTTP. إذا كنت تستخدم خادم HTTP آخر، فسيكون له نظام تكوين مشابه. لتعلم الكثير من البحث عن الشبكة ل “اسم عنوان URL الخاص ب HTTP-HTTP-Server Rewrite”.
أنت لا تريد أي مهاجمين من المحتمل أن يكون لديهم معلومات أكثر بكثير من الحد الأدنى من الخادم الخاص بك لتزويد العمل. قد تساعد معلومات التسرب مهاجما على فهم هيكل الملفات وما الذي تقوم به تحت طبقة HTTP الخاصة بك. معظم الهجمات آلية، مصممة لاتخاذ خادمك لأسفل لأنهم لاحظوا استخدام قطعة معينة من البرامج. جعل اكتشاف يساعد بقوة في مكافحة هذا الأتمتة.
في دليل موقع الويب الخاص بك، سترغب أيضا في التأكد من عدم توفير ملفاتك في فهارس الدليل، ووضع ملف Index.html أساسي داخل كل دليل سوف يتوقف عن العيون التي تقاوم. إذا كان الخادم الخاص بك يحتوي على قاعدة بيانات، فاحفظه على جهاز آخر (أفضل الممارسات)، أو إذا لم يكن ذلك ممكنا، فتأكد من الاحتفاظ به وراء جدار الحماية. أيضا لا تحتفظ بقواعد البيانات في دليل “الويب” الخاص بك. للحصول على الكثير من المعلومات حول قفل الخادم الخاص بك تحقق من الرابط.
عبر موقع البرمجة
سامي كامكار، مصمم دودة ساملي؛ صورة عن طريق مقابلة AMP ساعة من عام 2016
XSS أو هجمات البرمجة النصية عبر الموقع هي واحدة من ناقلات الهجوم أكثر شيوعا. هذا هو المكان الذي يستغله المهاجم برنامج نصي، على سبيل المثال قسم تعليقات Hackaday في أسفل هذه الصفحة بالذات. قد يحاول المهاجم أن يحاول ترك تعليق مع البرنامج النصي يحدد فيه. إذا نجح هذا بنشر رمز ضار في التعليق الذي يتم تشغيله على متصفح المستخدم كلما زار شخص ما هذه الصفحة. بالطبع محمية Hackaday من هذا النوع من الهجمات، ولكن المثال يحمل على المواقع التي تحتوي على نقاط الضعف XSS. سوف يكتب Sweatman دورة تحطم الطائرة على XSS والتي تستحق التدقيق.
ربما كان هجوم XSS الأكثر شعبية هو دودة سامسي. عثر Samy Kamkar على مشكلة عدم حصانة MySpace تسببت في فحص كل شخص من صفحته لإضافته كصديق وعرض رسالة على صفحة ملفه الشخصي. لقد انتشار الذات، لذا أصبح أي فرد قام بعد ذلك بالتحقق من صفحة بهذه الرسالة حاملة لإصابة الزوار الجدد. ما يقرب من عشين وضحاها الجميع على ماي سبيس كان بعد سامي. إنه يفكر في أن تصبح باحثا أمان وهو صديق رائع ل Hackaday.
عند استضافة خدمات الويب الخاصة بك التي توفر نماذج التقديم للسيطرة على شيء Your-bay-bay، تأكد من تفكير XSS. الخيار لهذا هو ما نسميه تنظيم البيانات. بالطبع يجب عليك تقييد ما يتضمن نموذج الويب الخاص بك (التنظيف “البرنامج النصي” وعلامات HTML الأخرى). تعد هجمات XSS شائعة جدا، وبالتالي فإن واجهة الويب لك جهاز IOT سيستخرف المدخلات، الآن وقت رائع للذهاب والتعلم بقدر ما تستطيع عن XSS.
هجمات الوصول المادي
الوصول الفعلي قد يكون أيضا مشكلة. قد يكون لديك جهازك في موقع عام أو يمكن الوصول إليه بسهولة. تحتاج إلى التأكد من عدم وجود أي شخص يدخله ويغفز قاتل USB أو أداة اختراق USB على سبيل المثال الذي يوضح كمخفوظات (جهاز واجهة بشري) مثل لوحة مفاتيح ويبدأ في إعادة إيقاف الأوامر من برنامج نصي تم تكوينه مسبقا. إذا كنت لا تحتاج USB، اجعلها لا يمكن الوصول إليها أو إيقاف تشغيلها عبر البرامج. إذا كنت حقا السلامة واعية لماذا لا تزيلها من اللوحة تماما، أو صب الايبوكسي عليها؟ حتى PS / 2 يجب تأمين المنافذ. قد ترى نمطا ناشئا هنا، وهو نهج أمان جيد هو، إذا لم تكن بحاجة إليها لماذا لديك في المقام الأول.
استخدام التدابير الأمنية المحاكاة والحصى
الأمان من خلال الغموض ليس فكرة جيدة أيضا، هناك دائما شخص ما هناك أكثر ذكاء أو أكثر حظا منك. حاول التمسك بتدابير السلامة المحاكاة والتحقق منها، ولا تفكر في ثاني لأن لديك بعض الأجهزة الفردية مع حجم سوقي أقل من 100 شخص / شركات ستكون آمنا. ليس هناك ما هو مقاوم للرصاص بنسبة 100٪ ولكن إذا كنت تعتقد أن جهازك لن يتم هجماته أبدا لأن “الأسباب” ثم فكر مرة أخرى. أعد تقييم موقفك وفرز سلعتك.
إذا اتبعت هذه التوصيات، فيجب أن تكون مؤمنا جيدا طالما أنك تتذكر تغيير كلمة المرور الافتراضية وتذكر أن هذا ليسدليل مائي هناك دائما شيء آخر يمكنك القيام به لآمنة جهازك. أعظم مشكلة حتى الآن فشل في التفكير في الأمان بأي شكل من الأشكال – يمكننا أن نفعل أفضل!
الوقاية في المستقبل
إن الإنترنت للأشياء يتم صيد الأجهزة بشكل صارم للرياضة المثالية الآن. يجب أن تكون متيقظا وتأكد من أن أجهزتك لا تخطئ للهجمات مثل Brickerbot أو تصبح جزءا من Botnet iot الحالي. ستكون هناك الكثير من الهجمات مثل هذا ليأتي في المستقبل. الحصول على المنحنى من خلال التعرف على السلامة والحفاظ على أجهزتك مغلق. إذا كنت شديدا حول الأمن السيبراني، فابدأ في القراءة حول الاتجاهات الحالية حيث توجد نقاط ضعف جديدة يوميا. إذا قمت بإجراء أجهزة للآخرين، فأنت بحاجة إلى أن تصبح خبيرا في هذه المهارات. إذا لم تتمكن من قول ذلك عن نفسك، فاستأجر بعض المهنيين. أنت لا تريد دعوى قضائية، ولا تريد أن تفقد ثقة العملاء، ولا تريد أن تكون بناء الأجهزة التي تهدد عالمنا المتصل.