Python + bash
Если вам часто требуется запускать shell команды из Python-кода, какой способ вы используете?
Самый низкоуровневый это функция os.system(), либо os.popen(). Рекомендованный способ это subprocess.call(). Но это всё еще достаточно неудобно.
Советую обратить своё внимание на очень крутую библиотеку sh.
Что она умеет?
🔸 удобный синтаксис вызова команд как функций
# os
import os
os.system("tar cvf demo.tar ~/")
# subprocess
import subprocess
subprocess.call(['tar', 'cvf', 'demo.tar', '~/'])
# sh
import sh
sh.tar('cvf', 'demo.tar', "~/")
🔸 простое создание функции-алиаса для длинной команды
fn = sh.lsof.bake('-i', '-P', '-n')
output = sh.grep(fn(), 'LISTEN')
в этом примере также задействован пайпинг
🔸 удобный вызов команд от sudo
with sh.contrib.sudo:
print(ls("/root"))
Такой запрос спросит пароль. Чтобы это работало нужно соответствующим способом настроить юзера.
А вот вариант с вводом пароля через код.
password = "secret"
sudo = sh.sudo.bake("-S", _in=password+"\n")
print(sudo.ls("/root"))
Это не все фишки. Больше интересных примеров смотрите в документации.
Специально для Windows💀 юзеров
#libs#linux
А что если?
Первый phishing 🐟 митап!
Для кого?
Если ты входишь в состав SOC(ОЦИБ) и тебе давно надоели алерты?!🗿 Думаю пора отдохнуть душой и телом!
Приглашаю тебя на дружеское соревнование по phishing-у 🎣🎣🎣
Да-да ты не ошибся! 😎
Мы поедем на рыбалку, где проведем время в компании единомышленников и немного посоревнуемся в скилах phishing-a - победит сильнейший(чей экземпляр будет тяжелее)!
На досуге разведем костер 🔥 и будем рассказывать байки о нелегкой работе из жизни работника SOC. Возможно появятся и те кто откроет занавесу тайны инцидента👀
Дата: выходные(суббота/ 3 или 10 августа)(с местом еще определимся)
Условия:
1)Состоять в группе ОЦИБ
2)Приехать со своей снарягой в указанное место
3)Чтобы вступить в группу, писать в личку @rarh1k с тэгом #phishing
г. Астана🙉
⚫️Microsoft и Cloudflare ликвидировали фишинговый сервис RaccoonO365
Компании Microsoft и Cloudflare сообщили о закрытии PhaaS-сервиса (Phishing-as-a-Service, «Фишинг как услуга») под названием RaccoonO365, который использовался для кражи тысяч учетных данных от Microsoft 365.
#киберновости#microsoft#cloudflare#phishing
🎁Буст канала
🚨 Warning: businesses are facing a new threat!
#Salty2FA and #Tycoon2FA are now attacking together. The #phishing campaign that's just been discovered is stealing corporate logins at scale.
See the breakdown and key IOCs for your SOC ⬇️https://thn.news/tycoon-cyber-phish
🚀 Authorities Freeze $12 Million in Cryptocurrency Crime Proceeds
Authorities from the United States, the United Kingdom, and Canada have collaborated in a cross-border operation to freeze $12 million in proceeds from cryptocurrency-related crimes. According to NS3.AI, the investigation specifically targeted phishing schemes, highlighting the ongoing efforts to combat cybercrime in the digital currency sector.
#cryptocurrency#cybercrime#phishing#lawenforcement#crossborder#digitalcurrency#crimeproceeds#NS3AI
#html#htr_tech#phisher#phishing#phishing_attacks#phishing_pages#zphisher
Zphisher is a tool that helps create fake login pages for popular websites like Facebook and Google. It offers pre-built templates and can automatically generate phishing URLs, making it easy to use even for beginners. The tool can collect login details entered by victims and send them to the attacker. It supports SSL encryption, making fake pages look more legitimate. Zphisher is meant for educational purposes only and should not be used to break the law. It helps users understand how phishing works, which can be beneficial for learning cybersecurity.
https://github.com/htr-tech/zphisher
🚀 North Korean Crypto Theft Funds Military Expenditures, Experts Warn
Security experts have highlighted that cryptocurrency theft is increasingly being used to finance North Korea's military activities. According to NS3.AI, researchers have observed a months-long infiltration targeting Drift Protocol, indicating a shift in North Korean operations. These activities have expanded beyond phishing to include attacks on exchanges, wallet services, and key permission holders of DeFi protocols.
#NorthKorea#CryptoTheft#MilitaryExpenditures#SecurityExperts#NS3AI#DriftProtocol#Phishing#Exchanges#WalletServices#DeFiProtocols