Jan 11, 2018

raspi 2/3 + TA7291P モータードライバ

以下ほぼ TA7291Pとraspi 2/3 の組み合わせのリンク紹介

Raspberry Pi 2でDCモーターを制御する (2015-07-07)
http://kaiware007.hatenablog.jp/entry/2015/07/07/024930
Raspberry Pi 2のピン配置
ブレッドボード図。シンプルで分かりやすい
コードについて、WiringPiをインストールし、g++でコンパイルする方式

Raspberry Pi 2でDCモーターを2つ制御する (2015-07-15)
http://kaiware007.hatenablog.jp/entry/2015/07/15/014119
PS3コントローラーでモーター制御
コードは、コンパイル方式

Raspberry pi 2 + モータードライバTA7291P (2016-01-16)
http://windvoice.hatenablog.jp/entry/2016/01/16/220541
モーターの回転速度、回転方向も含めて制御
コードは Python

Raspberry Pi 3でpythonを使いモータードライバーを使いモータを制御する! (2016/09/04)
https://qiita.com/RyosukeKamei/items/147de58738084826f749
コードは Python



Dec 31, 2017

firefoxの detectportal.firefox.com/success.txt へのアクセスを止める

プロキシのログを眺めていたら、firefoxが次のサイトにアクセスしているのが見えた。
http://detectportal.firefox.com/success.txt

Captive Portal機能らしいが、自宅PCには必要ないので、
network.captive-portal-service.enabledをfalseにして、様子を見ることにする。

ref.
Firefox が detectportal.firefox.com にアクセスするのを止める (03/31)
https://argrath.ub32.org/annex/2017/03/31-20.html
Captive Portalとは
https://www.designet.co.jp/faq/term/?id=Q2FwdGl2ZSBQb3J0YWw
Turn off captive portal (04/17)
https://support.mozilla.org/ja/questions/1157121network.captive-portal-service.enabledをfalseにする具体手順が分かりやすい

Dec 29, 2017

How to allow Skype through Sophos UTM

1. Purpose

  to use Skype with Sophos UTM Home Edition


2. Assumption

  The UTM has been configured and utilized for web surfing without issues

3. Configuration Procedure


3-1. Definitions & Users -> Network Definitions

  Define all IPs for Skype relay hosts.

ref. https://support.office.com/ja-jp/article/Office-365-URL-%E3%81%8A%E3%82%88%E3%81%B3-IP-%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E7%AF%84%E5%9B%B2-8548a211-3fe7-47cb-abb1-355ea5aa88a2#bkmk_lyo

3-2. Definitions & Users -> Service Definitions

  Define all ports for Skype relay hosts (except 443/tcp, which is already defined for web surfing)

ref. https://support.skype.com/ja/faq/FA148/skype-for-windows-desktopwoshi-yong-suruniha-donopotowokai-fang-surubi-yao-gaarimasuka


3-3. Network Protection -> Firewall

  allow outbound Service in [3-2] to the hosts in [3-1]
  for VPN users { not VPN Pool (L2TP, SSL),
  which didn't work in my environment }

3-4. Further Notes

  NO 45541 tcp/udp definition is necessary < -- verified on 30.Dec



Sophos UTM + squid + MS L2TP/IPsec

1. Purpose

To connect to the internal NIC for Web Admin of the UTM
under VPN (SSL and/or L2TP/IPsec) (through squid proxy)


2. Procedure 
2-1. The proxy config of MS L2TP/IPsec client didn't work

  Once configured as shown in the picture,
  it always goes thru proxy.

2-2. squid config


# vi /etc/squid/squid.conf
acl to_utm201712 dst a.b.c.d/32    # a.b.c.d = IP of Web Admin
    : ... snip ...
acl SSL_ports port 443
    : ... snip ...
acl CONNECT method CONNECT
    : ... snip ...
http_access allow CONNECT to_utm201712
http_access deny CONNECT !SSL_ports

# /etc/init.d/squid restart

2-3. Sophos UTM Home Edition

Management -> WebAdmin Settings
  Allowed Networks : hopefully limited to internal and VPN Pool IPs


Dec 28, 2017

MS17-010、振り返り

EternalBlue悪用の新種もあり得るし、個人的には未だ終わっていないと思っています。
今年を振り返る記事・番組があったら、改めてパッチ適用の重要性を淡々と伝えて欲しい。
下記、良記事と思うので、ここにメモ。

[日本語: Japanese] MS17-010 EternalBlue Exploit / DoublePulsar
 Implant Metasploit Demo - YouTube

WannaCryの概要・使用された脆弱性 #ssmjp /ssmjp1710-2 (12/24)

・ワーム能力を身に付けたランサムウェアWannaCryが世界を駆け巡る
 いろいろ頷ける点が多い

WannaCry ランサムウェア – 生かされなかった SlammerConflicker の教訓 (05/14)
『障害 (およびそれに対応するパッチに、すべての Windows システムに存在する SMB などの共通コンポーネントとリモートコード実行が関与している場合には、ポリシーよりも対策が優先されるべきです』 

--> 12/31 追記
手元のUTMが、今週ドロップしたパケット。
445/TCPは WannaCry系か? 未だ Conficker系も有るんだろうか?

TOP10 dropped services
Total dropped packets: 20 112
Top Service Name Protocol Service Packets %
1 MICROSOFT-DS TCP 445 3 211 15.97 %
2 TELNET TCP 23 3 049 15.16 %
 :... snip ...   :   : 
5 MS-SQL-S TCP 1433 768 3.82 %
6 SSH TCP 22 520 2.59 %
7 3D-NFSD TCP 2323 400 1.99 %
8 DOMAIN UDP 53 382 1.90 %
9 TCP 8545 338 1.68 %
10 HTTP TCP 80 309 1.54 %

Dec 26, 2017

記事、ANAの株主優待券を不正転売

・ANA株主優待券不正転売 数億円利益か
元グループ社員解雇も不祥事公開せず (12/25)
『実際に誰かが使用済み優待券を使い、国内線を安く利用したのであればANAに損害が発生した可能性がある ... 事実関係は速やかに公表すべきだったのではないか』

Androidを監視ツール化する「Haven」

・スノーデン氏、Android端末をセキュリティ監視ツールに変えるアプリ「Haven」をβリリース (12/25)
『われわれはHavenをジャーナリスト、人権活動家などのために設計した』
長期休暇のお出かけの監視カメラに重宝しそう。

あのスノーデンが開発したAndroidセキュリティアプリ「Haven: Keep Watch」の使い方 (12/25)
HavenをインストールしたAndroid端末が、周囲の光や音、振動に反応・感知し、異変を別のスマートフォンにSMSで通知するというもの』

設定や、使い方が分り易い。
また、使い勝手など良く考えられて作られた印象。
 
Tor Onionでのリモートアクセスの設定などもある』そうで興味深い。Torじゃなくても良いけど。

Haven: Keep Watch (BETA)