https://access.redhat.com/security/security-updates/#/
搜尋此網誌
2016/10/12
2016/10/11
[excel]IP2LONG語法
將ip轉成整數後比對範圍,比字串比對效率高的多,看到有網站說明如何轉換的語法,還有sql的語法
http://vcert.blogspot.tw/2013/04/ip2long-and-long2ip-in-excel.html
EXCEL:
=MID(D1,1,FIND("|",SUBSTITUTE(D1,".","|",1))-1)*2^24+MID(D1,FIND("|",SUBSTITUTE(D1,".","|",1))+1,FIND("|",SUBSTITUTE(D1,".","|",2))-FIND("|",SUBSTITUTE(D1,".","|",1))-1)*2^16+MID(D1,FIND("|",SUBSTITUTE(D1,".","|",2))+1,FIND("|",SUBSTITUTE(D1,".","|",3))-FIND("|",SUBSTITUTE(D1,".","|",2))-1)*2^8+MID(D1,FIND("|",SUBSTITUTE(D1,".","|",3))+1,4)
http://vcert.blogspot.tw/2013/04/ip2long-and-long2ip-in-excel.html
EXCEL:
=MID(D1,1,FIND("|",SUBSTITUTE(D1,".","|",1))-1)*2^24+MID(D1,FIND("|",SUBSTITUTE(D1,".","|",1))+1,FIND("|",SUBSTITUTE(D1,".","|",2))-FIND("|",SUBSTITUTE(D1,".","|",1))-1)*2^16+MID(D1,FIND("|",SUBSTITUTE(D1,".","|",2))+1,FIND("|",SUBSTITUTE(D1,".","|",3))-FIND("|",SUBSTITUTE(D1,".","|",2))-1)*2^8+MID(D1,FIND("|",SUBSTITUTE(D1,".","|",3))+1,4)
2016/9/28
[python]設定timezone及取時間
我的python有點弱找了一陣子,感覺最簡單的方式算是這樣使用了
筆記一下
import pytz, datetime
tz=pytz.timezone('Asia/Taipei')
dt=datetime.datetime.now(tz)
print dt.strftime("%b %d %H:")
http://strftime.org/
筆記一下
import pytz, datetime
tz=pytz.timezone('Asia/Taipei')
dt=datetime.datetime.now(tz)
print dt.strftime("%b %d %H:")
http://strftime.org/
如果要
| Code | Meaning | Example |
|---|---|---|
%a | Weekday as locale’s abbreviated name. | Mon |
%A | Weekday as locale’s full name. | Monday |
%w | Weekday as a decimal number, where 0 is Sunday and 6 is Saturday. | 1 |
%d | Day of the month as a zero-padded decimal number. | 30 |
%-d | Day of the month as a decimal number. (Platform specific) | 30 |
%b | Month as locale’s abbreviated name. | Sep |
%B | Month as locale’s full name. | September |
%m | Month as a zero-padded decimal number. | 09 |
%-m | Month as a decimal number. (Platform specific) | 9 |
%y | Year without century as a zero-padded decimal number. | 13 |
%Y | Year with century as a decimal number. | 2013 |
%H | Hour (24-hour clock) as a zero-padded decimal number. | 07 |
%-H | Hour (24-hour clock) as a decimal number. (Platform specific) | 7 |
%I | Hour (12-hour clock) as a zero-padded decimal number. | 07 |
%-I | Hour (12-hour clock) as a decimal number. (Platform specific) | 7 |
%p | Locale’s equivalent of either AM or PM. | AM |
%M | Minute as a zero-padded decimal number. | 06 |
%-M | Minute as a decimal number. (Platform specific) | 6 |
%S | Second as a zero-padded decimal number. | 05 |
%-S | Second as a decimal number. (Platform specific) | 5 |
%f | Microsecond as a decimal number, zero-padded on the left. | 000000 |
%z | UTC offset in the form +HHMM or -HHMM (empty string if the the object is naive). | |
%Z | Time zone name (empty string if the object is naive). | |
%j | Day of the year as a zero-padded decimal number. | 273 |
%-j | Day of the year as a decimal number. (Platform specific) | 273 |
%U | Week number of the year (Sunday as the first day of the week) as a zero padded decimal number. All days in a new year preceding the first Sunday are considered to be in week 0. | 39 |
%W | Week number of the year (Monday as the first day of the week) as a decimal number. All days in a new year preceding the first Monday are considered to be in week 0. | 39 |
%c | Locale’s appropriate date and time representation. | Mon Sep 30 07:06:05 2013 |
%x | Locale’s appropriate date representation. | 09/30/13 |
%X | Locale’s appropriate time representation. | 07:06:05 |
%% | A literal '%' character. | % |
[資安]CVE-2016-6662 mysql、mariadb
都忘記發文了,
主要是CVE-2016-6662這個漏洞,最先公告的地方是這網站
http://legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.txt
簡中版
http://bobao.360.cn/learning/detail/3027.html
影響範圍
主要是CVE-2016-6662這個漏洞,最先公告的地方是這網站
http://legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.txt
簡中版
http://bobao.360.cn/learning/detail/3027.html
影響範圍
MySQL <= 5.7.14 Remote Root Code Execution / Privilege Escalation (0day)
5.6.32
5.5.51
MySQL clones are also affected, including:
MariaDB
PerconaDB
但底下的III. INTRODUCTION寫了
The vulnerability affects all MySQL servers in default configuration in all version branches (5.7, 5.6, and 5.5) including the latest versions, and could be exploited by both local and remote attackers. Both the authenticated access to MySQL database (via network connection or web interfaces such as phpMyAdmin) and SQL Injection could be used as exploitation vectors.
看起來是全系列都受影響,但測試舊版的rhel6 mysql、rhel5 mysql發現並無my.cnf內沒有mysqld_safe的相關設定,所以只影響到新版包含使用mysql source code fork出去的資料庫
基本上漏洞使用的方式就是分2種
1、有帳號
使用此漏洞可以修改my.cnf,可以控制my.cnf
2、沒帳號
使用trigger,讓mysql在flush時觸發後提權帳號,再控制my.cnf
暫態解法
https://www.psce.com/blog/2016/09/12/how-to-quickly-patch-mysql-server-against-cve-2016-6662/
https://dev.mysql.com/doc/refman/5.5/en/mysqld-safe.html#option_mysqld_safe_malloc-lib
https://github.com/percona/percona-server/commit/c14be53e029442f576cced1fb8ff96b58e89f2e0#diff-144aa2f11374843c969d96b7b84247eaR261
暫時性可以用的解法在mysql官方還沒正式更新前,就是用github裡的方式,指定可以載入lib的目錄,非這些目錄的不可以載入
http://bobao.360.cn/learning/detail/3026.html
http://www.ithome.com.tw/news/108454
http://avfisher.win/archives/tag/mysql
http://avfisher.win/archives/tag/mysql
http://legalhackers.com/exploits/0ldSQL_MySQL_RCE_exploit.py
2016/9/7
[php]資安的東西
PHP Security Cheat Sheet
https://www.owasp.org/index.php/PHP_Security_Cheat_Sheet
the Month of PHP Security
http://blog.php-security.org/index.html
https://github.com/OWASP/phpsec/blob/master/README.md
Security in PHP - 那些在滲透測試的小技巧
http://www.slideshare.net/p8361/php-15004638
https://www.owasp.org/index.php/PHP_Security_Cheat_Sheet
the Month of PHP Security
http://blog.php-security.org/index.html
https://github.com/OWASP/phpsec/blob/master/README.md
Security in PHP - 那些在滲透測試的小技巧
http://www.slideshare.net/p8361/php-15004638
訂閱:
文章 (Atom)

