2009年6月30日 星期二
[Linux][Fedora 11]安裝MySQL
原文網址:http://roclinux.cn/?p=1551
首先到MySQL官網下载mysql-5.1.32.tar.gz(是source唷,不是rpm)
#tar -xzvf mysql-5.1.32.tar.gz
#cd mysql-5.1.32
後來執行./configure時
發現出現configure: error: No curses/termcap library found(不知道為甚麼我的電腦會找不到兩個函式庫)
就改成,指定lib(其實電腦裡有咩,怎麼都不會自己指過去)
#./configure --with-named-curses-libs=/lib/libncursesw.so.5
成功configure之後
#make(編譯!)
#make iinstall(這步很重要唷)
結果又出現錯誤
../depcomp: line 502: exec: g++: not found
後來就用新增/移除軟體灌上g++:忘記版本是什麼了,檔名要長這樣XD
gcc-c++-4.1.0-3
然後在重新configure一次
#./configure --with-named-curses-libs=/lib/libncursesw.so.5
#make
#make iinstall
大功告成之後執行
#mysql_install_db
可能會發生chown: `mysql': invalid user
就...
#useradd -r mysql
自己造一個user
其中有一個localhost的問題,我去改了/etc/hosts,但還是有問題,最後是用
#mysql_install_db --force強制通過的
#mysqld_safe
#netstat -lntp|grep 3306(MySQL通常listen的埠口)
總是try and error
非常的凌亂= =
2009年6月29日 星期一
[Linux][Fedora 11]第一個Fedora Eclipse HelloWorld
不知道要怎麼compile程式...好弱
最近要忙工作以外的事情
根本沒時間study= =
超感恩的
早上在搜尋有關compile helloworld的教學
找到了c++在eclipse的範例,他的工具叫做cdt
一下反應想到會不會有jdt...
還真的有就給他裝下去
就...可以跟windows一樣compile了
好感恩QQ
[Linux][Fedora 11]上載檔案到vsftpd伺服器
發現只能下載不能上傳
最後又設定了/etc/vsftpd/vsftpd.conf的
ascii_download_enable=YES
ascii_upload_enable=YES
終於可以了!
以上
2009年6月28日 星期日
[Linux][Fedora 11]安裝vsftpd
之前自己要架ftp,卻沒有辦法連進去,後來就放棄了
這次很認真,總算誤打誤撞設定好了,在fedora 11上先灌上vsftpd
然後簡單設定一些東西
可以參考鳥哥linux
http://linux.vbird.org/linux_server/0410vsftpd.php
到這裡還不OK
因為我發現要執行
#ftp localhost
卻會被selinux擋住,selinux那是什麼~?
我也不知道,總之鳥哥說不懂就關掉吧XD|||
可以參考以下:
http://linux.vbird.org/linux_server/0240network-secure-1.php#packet_flow_protect
關掉的方法:
[root@linux ~]# vi /etc/selinux/config
# 將底下的設定值改成這樣:
SELINUX=disabled
2. 修改開機時 grub 的設定檔
[root@linux ~]# vi /boot/grub/menu.lst
.....省略.....
kernel /boot/vmlinuz-2.6.9 ro root=/dev/hda1 rhgb selinux=0
.....省略.....
3. 重新開機
[root@linux ~]# sync; reboot
最後要連結時,又發現出現問題如下:
500 OOPS: could not open chroot() list file:/etc/vsftpd.chroot_list
就問了google,在/etc/vsftpd/vsftpd.conf
把chroot_list_enable=YES那一行mark掉
最後連結成功要ls家目錄的東西卻又發現有另一個問題:
421 Service not available, remote server has closed connection
我又修改了/etc/hosts.allow
把vsftpd: all加入
好像還是不能連結,最後索性關掉防火牆= =
終於可以用了!(感覺有點危險)
以上,這真得是很亂的一篇,就如同這次在try的過程,亂七八糟XD
2009年6月25日 星期四
[Linux][Fedora 11]尋找檔案的好利器:locate
tcpdump跟setkey還真頭痛
雖然這些都是應該要內建
但想打了半天都沒有自動完成
最後發現用locate可以找到
只好用絕對的路徑去把他叫出來用...
anyway
以上!
2009年6月24日 星期三
[Linux][Fedora 11]vi與vim的取代功能
還是懷念使用vi跟vim
期中一個要大量取代字串的指令如下
:1,$s/oldstr/newstr/gc
1代表每一行都要替代
$s代表字串
oldstr就是原本的字串
newstr就是新的字串
gc就是全部替換每個都要問是否要替換
以上!
[Blogger][Google Blog]如何加入sitetag
心想,那~他的部落個應該是自己人,文章應該會比較好被搜尋到
所以,就!用了這個
沒想到對於一些框架不太熟,用過一次sitetag後來就忘記了。
這次一定要記起來!
1. copy嵌入追蹤碼的script,放到版面配置,修改HTML,加到最後面< / body>之前
2. copy搜尋標籤雲,內容標籤雲,文章標籤列表的script
放到版面配置,網頁元素,選新增小工具的基本:HTML/JavaScript這個選項,就可以把script copy上去了!
以上,超酷!
2009年6月23日 星期二
[Linux][Fedora 11]緊隨Win 7發佈 Fedora 11預覽版初體驗
還蠻詳細且基礎,第一次用的人很容易就上手!
原文:http://server.zol.com.cn/133/1333856.html
[Linux][Fedora 11]一定要學指令:yum簡介
引用如下:
眾所皆知的, RPM 是目前 Linux 世界裡面用的最多的套件安裝方式。不過,由於 RPM 所管理的套件在安裝的時候必須要考慮到不同套件之間的相依性,這在系統管理員處理系統的升級/更新上面是很討厭的!為了克服這個問題,所以有 APT/YUM 之類的計劃出來。
心得:
沒錯~超討厭的= =版本呀,相依性的問題
yum是目前被 Red Hat 及 Fedora 列為預設的 RPM 套件安裝/升級機制伺服器。
yum 在 Red Hat 及 Fedora 是標準配備,所以您無須傷腦筋。(我喜歡XD|||超懶人)
[Linux][Fedora 11]安裝Ecipse
Java的開發環境末說別的
Eclipse堪稱第一把交椅!
可是之前抓了好幾個版本的eclipse自己安裝,都不太能執行
除了早期的2.0版本
竟然~又可以Google到一篇這樣的文章,是教我們安裝最新Fedora 11的專用eclipse XD
好強...
網址如下:http://server.zol.com.cn/133/1333991.html
竟然可以用
#yum install eclipse-platform
就裝好了
前面那幾天是怎樣^&*@^%*ˊˇ
總之很感恩!!
[Linux][Fedora 11]遠端桌面不是夢:tsclient
找到一篇文:http://docs.google.com/Doc?id=dcd653tx_329chmtmzcx
系統-管理-新增/移除軟體
搜尋tsclient
安裝client for VNC and Windows Terminal Server
安裝完之後
在應用程式-網際網路-執行終端機伺服器客戶端
就可以像平常在windows連接一樣囉!
不過剛剛測試一直斷線,不知道為什麼= =?
2009年6月20日 星期六
[Dreamweaver CS4]更改連結字型顏色,移除下標
敝人也做網頁XD
之前一直很困擾...每次在字上面加上連結,字就會變成藍色加上底線
實在覺得醜死了
對Dreamweaver CS4又不太熟
後來問了Google,方法如下:
1. 把要改變字型顏色的地方框起來
2. 選擇CCS面板
3. 找"編輯規則"的按鈕,按下去
4. 把Text-decoration改成none,顏色從Color改就可以了
以上!
2009年6月19日 星期五
[Linux][Fedora 11]移除資料指令
有點腦殘XD
竟然忘記了rm這個指令
mv錯東西,忘記怎麼刪掉
後來差了股歌大神~
#rm 檔案
#rm -rf 資料夾
--r這個optiong就是移除包含資料夾裡面所有東西
--f就是不要問東問西(如果用這個,資料夾裡面很多層,會按yes按到瘋掉XD),就是刪掉
以上,大家要常常玩linux唷,很寶!
[Linux][Fedora 11]查詢已經安裝rpm套件
不過還是有用rpm
查詢安裝過哪些rpm套件可以用,例如這裡查得是jdk
#rpm -qa | grep jdk
結果:
java-1.6.0-openjdk-plugin-1.6.0.0-22.b16.fc11.i586
java-1.6.0-openjdk-1.6.0.0-22.b16.fc11.i586
jdk-1.6.0_14-fcs.i586
[Linux][Fedora 11]安裝JDK-1.6.0
[root@redarmy] chmod +x jdk-6u14-linux-i586-rpm.bin
[root@redarmy] ./jdk-6u14-linux-i586-rpm.bin
[root@redarmy] rpm –ivh jdk-6u14-linux-i586.rpm
安装好的JDK 会存在 /usr/java/jdk1.6.0_14 目录中。
安裝完不用再設定/etc/profile(不用設定CLASSPATH)
超方便的啦
[Linux][Fedora 11]vncserver相關指令
#vncserver
這時候會要求提供連vnc的密碼,長度要超過6
記得要用setup,開啟防火牆的埠號,1就設定tcp:5901
然後在自己本機電腦開啟vncviewer,輸入xxx.xxx.xxx.xxx:埠號,就可以連線囉
Fedora好的地方就是不會像一般連進去畫面醜醜的,他會先設定好,讚啦!
最後可以用
#ps -aux|grep vnc
看看現在在跑的vncserver
如下:23317就是他的Process ID
username 23317 0.0 0.9 31816 20112 pts/0 S 14:47 0:01 /usr/bin/Xvnc :1 -desktop localhost.localdomain:1 (username) -auth /root/.Xauthority -geometry 1024x768 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5901 -fp catalogue:/etc/X11/fontpath.d -pn
如果要關掉這個vncserver:
#kill process id(這裡是23317)
2009年6月18日 星期四
[Linux][Fedora 11]vncserver使用小小小心得
之前使用Linux幾乎都是用人家灌好的
或者一安裝就把所有套件給他裝進去
但是這次灌Fedora 11卻發現沒有全部套件安裝的選項
就這樣灌好了之後,缺這個缺那個= =
原來,他是想要模仿Windows的"新增移除軟體"。
發現了這個選項,終於!!安裝了vncserver!
之前自己抓都有套件相容問題,F11又是最新版,實在讓這個業餘MIS很頭痛= =
感恩@@
2009年6月17日 星期三
[Linux][Fedora 11][帳號管理]useradd, passwd, userdel
[網路安全][滲透工具]Core Impact可能是已知的最普及的商業工具測試.
一篇翻譯工具機翻譯的介紹,重點是他提供的DEMO網頁XD
原文網址:http://www.shineblog.com/user2/xmmc/archives/2006/627446.shtml
If you are not sure what a penetration testing tool is you could check my previous post: Introduction to Automated Penetration Testers .如果你不知道你是一個穿透測試工具可以查我以前的職:引言自動穿透測驗.
The company is wide famous among security guys also for a series of parallel works, from publishing public security advisories and research papers, to hosting some very interesting security projects, which in part are inside Impact.著名大公司之間也進行了一系列的安全佬並行工程發佈公安警告和研究論文,有的很有趣主辦保安工程其中一部分是黨內的影響.
After following a demo webcast about new features Impact 5.0 offers, I was contacted by the company as usual in these cases.下一個演示播後約5.0新特點衝擊出價我所接觸的公司在這種情況如常.
I asked if I could produce a public review about the product on Security Zero and received an enthusiastic positive answer.我問如果我能出示一份公開檢討有關安全生產零接待熱情積極的回答.
I received more online, interactive training on a real installation and the trial product to realize the following review.我接到更多的網上互動式培訓和試生產裝置真正實現下述審查.
Installation and configuration安裝和配置
Core Impact 5.0 will fit well in a Windows XP Professional machine but will absolutely require administrative privileges for installation.核心將影響5.0適合於視窗XP專業機但是絕對需要行政特權進行安裝.
As soon as you start the program you’ll notice the downloaded updates summary.只要你的節目,你就會開始下載最新公告摘要.
They are composed by new exploits developed by Core Security, which customers can download for a whole year since the day their license starts, and the new OS fingerprinting database, provided by NMap.他們組成了新研製的核心戰功安全讓客戶可以下載了整整一年,自許可之日起的,而新的作業系統指紋資料庫,提供MA的. onclick="javascript:window.open(this.src);" onload="javascript:if(this.width>440){this.resized=true;this.style.width=440;}" v:shapes="_x0000_i1025">
The update operation can be manually invoked at any time and I strongly suggest doing so before any new penetration test.更新操作可隨時手動援引做之前,我強烈建議任何新的滲透測試. onclick="javascript:window.open(this.src);" onload="javascript:if(this.width>440){this.resized=true;this.style.width=440;}" v:shapes="_x0000_i1026">
When a new vulnerability goes public, Core Security develops and put online for download a new exploit in a 1-2 weeks timeframe.當新上市的脆弱,核心安全和發展提出了新的開拓,在網上下載了1-2周時間.
Penetration tests management is organized in Workspaces, which you can assign to your customers or parts of your network to be treated as isolated.滲透測試組織工作空間管理、你可以把你的客戶或你的網路部分視為孤立.
Every workspace is ciphered with prime numbers generated by mouse movements and a user-defined passphrase.每一個素數與工作空間是ciphered產生滑鼠動作和使用者定義passphrase.
This is an important feature granting privacy even in machine theft case.這是一個重要特徵,即使給予隱私權機盜竊案.
Impact activity is organized in 6 phases:活動舉辦6期的影響:
- Network Discovery網愉
- Attack and Penetration攻擊與滲透
- Local Information Gathering本地資訊採集
- Privileges Escalation特權升級
- Clean Up清理
- Report Generation報告生成
Targets discovery發現目標
The network discovery module is developed directly by Core Security and as already said it uses the NMap OS fingerprinting database.愉模組開發網路安全和直接的核心內容已經說過利用MA的作業系統指紋資料庫.
' border=0 onclick="javascript:window.open(this.src);" onload="javascript:if(this.width>440){this.resized=true;this.style.width=440;}" v:shapes="_x0000_i1027">
You can choose to customize the discovery asking to recognize applications instead of just enumerating ports (like NMap can do since some releases).你可以選擇定制的發現不是只要求確認申請列舉港口(MA的一樣可以做,因為有些發佈).' border=0 onclick="javascript:window.open(this.src);" onload="javascript:if(this.width>440){this.resized=true;this.style.width=440;}" v:shapes="_x0000_i1028">
This module can easily replace any vulnerability scanner you have, like Shadow Security Scanner or eEye Retina.這個單元可輕易取代你有什麼弱點掃描器,像影子eeye安全或視網膜掃描器.
Another way to find targets to attack is to import a list from portscanners and vulnerability scanners like NMap, Nessus, Retina, LANguard and Saint.另一種方法是尋找攻擊目標的名單,由進口portscanners像MA的掃描器和脆弱,Nessus中,視網膜,languard和聖.
The attack攻擊
The real attack can be configured in a very flexible way: you can choose if permit DoS attacks, which eventually will freeze the target network, you can choose to be very invasive giving priority to privileges escalations exploits, etc.真正的攻擊可以在很靈活配置:如果你可以選擇允許DoS攻擊,最終目標將凍結網路你可以選擇要非常侵襲優先特權升級功勳等 onclick="javascript:window.open(this.src);" onload="javascript:if(this.width>440){this.resized=true;this.style.width=440;}" v:shapes="_x0000_i1029">
Impact intelligently selects which exploit to launch against a target analyzing what ports portscanner module found opened.聰明選擇利用發起衝擊而目標分析發現什麼港口portscanner艙打開.
But remember this method is prone to the tricky use of non-standard ports for services, rarely used by companies to protect certain private, critical applications.但這種方法很容易記刁鑽的使用非標準港口服務很少使用的一些私人公司來保護,關鍵應用.
When it finds vulnerability in a target system it immediately exploits it injecting an agent.當它發現了目標體系脆弱戰功它立即注射代理人. And this is for sure the strength of Impact.這是肯定的力量衝擊.
Agents are classified on an invasive level from 0 to 1.歸類於一個創一級代理商0至1. A higher agent level means more attack actions available on the target system, until the total machine control.代理人更高層次就意味著更多的攻擊行動,目標可制,直到完全控制機器.' border=0 onclick="javascript:window.open(this.src);" onload="javascript:if(this.width>440){this.resized=true;this.style.width=440;}" v:shapes="_x0000_i1030">
onclick="javascript:window.open(this.src);" onload="javascript:if(this.width>440){this.resized=true;this.style.width=440;}" v:shapes="_x0000_i1031">
Depending on how severe the found vulnerability is Impact will be able to inject an agent of level 0 or 1.視乎嚴重影響脆弱的發現將可注入代理人級別0或1.
But if you chosen to be not much invasive it will try to inject level 0 agents everywhere.但如果你要選擇不多侵襲它將嘗試注入一級代理商四處0. At a second time you’ll be able to upgrade the agent from level 0 to level 1.下午二時則可以提升代理人從0到1級水準.
Pre-made actions (organized in modules) offered by agents are impressive: from simple screen capture to user password dumping, to keylogger installation (and remote sending of every single key pressed by users), to personal firewall disabling, to DLL injection into a running process.預作行動(模組組織)提供的代理商可觀:從簡單到螢幕捕獲使用者密碼傾銷keylogger來安裝(與遠端傳送到每一個用戶按下鍵),個人防火牆致殘、為了DLL的運行過程中注入了.
One of the most critical actions is the password sniffer installation with its packet driver.其中最關鍵的行動是其安裝包嗅探密碼司機.
But the most important feature at all is the capability of using an already-compromised machine (where an agent already is injected) as source for a new attack wave.但最重要的特點是所有具備利用一個已經失密機(如代理人已經注)作為一種新的攻擊波源泉.
In this way every attack can be relaunched towards new network segments where the compromised machine could be connected, unreachable from the starting attack position.這樣,每攻擊可以重新邁向新的網路部分受損機器可連接,從遙不可及的出發攻擊位置.
In my test environment the first penetration test victim had two network interfaces connected to networks 10.0.0.0 and 10.1.0.0.我第一次滲透測試環境測試網路介面連接兩個受害人和網路10.0.0.010.1.0.0.
The machine where Impact was installed was on the 10.0.0.0 network and from there was impossible to reach the 10.1.0.0 network.機器被安裝在那裡的影響,並從那裡10.0.0.0網路無法到達10.1.0.0網路.
Attacking and compromising the first victim made possible to reach the second network and a second victim, compromising it too.攻擊與妥協的第一個受害者可能達到二、二網受害人過於妥協.
Every single module is developed in Python and Core Security offers customers the chance to create their home-made modules to be integrated inside Impact.每個單元在巨蟒和核心是發展機會,創造顧客提供安全的土制單元內將綜合影響. Obviously an appropriate know-how is required to do so.顯然適度訣竅需要這樣做.
At today attacks cannot be scheduled in any way and this is really a pity since Impact can already register an attack sequence with a Macro Wizard.原定在今天襲擊不能以任何方式和影響,這是很可惜,因為已經登記順序與宏觀男巫攻擊.
Anyway Core Security could evaluate introducing this feature in a future release if customers start asking for it.反正核心引入安全評價這一特點可以在未來如果用戶開始要求釋放.
Meanwhile you could try to drive Impact with 3rd party’s automation tools like Automate.另外你可以嘗試駕駛與三號影響黨的自動化工具,如自動化.
Information gathering資訊採集
When an agent is installed on a target machine, customers can require as much information about that machine as they want: what OS patches are installed, local running services, installed applications, etc.當代理人的目標是安裝在機顧客可以要求更多的資料,他們希望機器:什麼是作業系統塊安裝本地運行服務安裝應用系統等
You’ll eventually find now the data you’re looking for.你現在終於找到你要找的資料.
Agents clean-up代理商大掃除
At the end of penetration testing you can launch a clean-up procedure, removing any agent installed on victims, to revert the environment to original conditions.截至滲透測試你可以發動大掃除,清除劑安裝在任何受害者回復到原來的環境條件.
Reporting報告
The reporting module is really complete.報告模組真的完成. Is able to extract data and arrange it in four different kinds of reports, aimed to different audiences, from the executive manager to the security manager.能提取資料,並安排在4個不同類型的報導,以不同的觀眾,從行政經理到保安經理.
The report is generated by the embedded Crystal Report engine, from BusinessObjects, and can be viewed by the embedded Crystal Report Viewer.該報告是由水晶報告嵌入引擎,從businessobjects,並可以由水晶報告嵌入觀眾.
Then you can print it or save in a lot of formats: PDF, HTML, XML, RPT (Crystal Reports), XLS, DOC, etc. It can even be injected in a database via ODBC.然後你可以列印或格式節省了不少:以PDF、HTML語言、XML技術、多哥(水晶報導)用xls,商務部等,甚至可以透過ODBC的資料庫注入.
Here an example .這裡一個例子.
Pricing定價
Core Security typically offers a one-year unlimited license, able to scan as many IPs as the customer wants and including product updates, training, maintenance and support.提供一個安全的核心通常一年無限許可能夠掃描的客戶要多通訊社等產品的更新換代和訓練,維護和支持.
After the year you can still use the product but don’t have exploits updates.一年之後你仍然可以使用,但沒有戰功產品更新.
The price for such a license is of $25,000 USD.這種價格是25,000美元執照.
Even if the price seems expensive, the cost of a single, outsourced, penetration test on a complex environment can go far beyond it.即使價格似乎昂貴費用單,外包、穿透了複雜環境的考驗才能超越它.
The bottom line底線
Core Impact is a real complex product with huge potential, but has a very high learning curve and you just need few hours to manage basic features with confidence.核心是真正影響複雜產品潛力巨大,但有一個非常高的學習曲線,你只需幾小時管理的基本特徵與信心.
The product has a price worth paying with these characteristics.該產品具有這些特點值得付出的代價.
On the end I strongly suggest it to companies who implemented or are implementing a security assessment plan on their infrastructures, particularly if are much extended.我強烈建議在年底前向公司實施或正在實施安全評估的基礎設施計畫,特別是如果大大延長.
I also would recommend it to consulting companies offering a penetration testing service.我也將推薦給公司提供諮詢服務滲透測試.
[網路安全][滲透工具]Core Impact簡介
Core Impact:
全自動的全面入侵偵測工具 Core Impact可不便宜(先準備個上萬美元吧),但它卻是公認的最強的漏洞檢測工具。它有一個強大的定時更新的專業漏洞資料庫,它可以輕易的黑掉一台電腦,並以它為跳板再去作別的事情。
之前有看到兩個很有趣的功能SQL Injection,Cross-Site Scripting,可以輕易的對網站注入Agent並且取得很多資料
可以參考DEMO影片:
https://coresecurity.webex.com/coresecurity/lsr.php?AT=pb&SP=EC&rID=6998727&rKey=CCB4D6E45A4A2069
參考書:
Security Power Tools(防駭超級工具)