++++🔥 ความปลอดภัยกับการโค้ดดิ่ง 🔥+++
การเขียนหน้าเว็บ ที่มีแบบฟอร์มให้กดอัพโหลดไฟล์
...พอกด upload
...ไฟล์นั้นจะถูกนำไปวางบน server ปั๊บ
.
ถ้าเราเขียนโค้ดฝั่ง server ไม่ระมัดระวัง ตัวละก็ ...ฮึๆๆๆ
ก็จะมีรูรั่ว เมื่อhacker เห็น
ก็จะยิ้มหน้าบานเป็นจานดาวเทียม
เขาสามารถโจมตีช่องโหว่ได้ไม่ยากเย็นอะไรนัก
.
ซึ่งจะขอยกตัวอย่างภาษา PHP มาเป็นกรณีศึกษาแล้วกัน
:
😉 สำหรับวิธีโจมตีนี้
อาศัยความง่ายของ php ที่แค่วางไฟล์บน server ในทันใด
เราก็สามารถเรียกไฟล์นั้น ผ่าน url ให้ทำงานได้เลย ในทันที
...ดูง่ายมั๊ยละ!!!!!
.
*** หมายเหตุ แต่ถ้าเป็นภาษาโปรแกรมมิ่งบางภาษา
ที่เข้มงวดความปลอดภัย
การโจมตีแบบนี้จะยาก
เพราะโปรแกรมเมอร์ต้อง config ไฟล์สคริปต์ก่อน
สคริปต์นั้นถึงจะประมวลผลได้
:
:
แต่ในโพสต์นี้จะขอยกตัวอย่างโค้ด PHP ที่มีช่องโหว่นะครับ
ก็ตามรูปที่โพสต์ จะประกอบไปด้วย
:
1) หน้าฟอร์ม HTML (index.html) เอาไว้ให้อัพโหลดไฟล์ (ฝั่ง browser)
2) เมื่อ user กดอัพโหลดไฟล์ ...ไฟล์นั้นจะถูกส่งไปยัง server
3) ฝั่ง server จะใช้ภาษา PHP ง่ายๆ (upload.php) รับไฟล์ที่ส่งเข้ามา แล้วนำไปวางไว้ที่โฟล์เดอร์ใดที่หนึ่งในเครื่อง เช่น uploads
:
😱 ซึ่งการเขียนโค้ดที่ง่ายเกิ๊นไปเช่นนี้
จะเป็นช่องโหว่ให้ hacker
สามารถอัพโหลดไฟล์อันตรายขึ้นไปวางบน server ได้ชิวๆๆ
:
🤔 ดังนั้นเราต้องป้องกันการโจมตีด้วยวิธีนี้ อาทิ
- ต้องเข้มงวดเรื่องนามสกุลไฟล์ว่า ไฟล์ชนิดอะไรที่ห้าม upload (เช่น .php ห้ามทำเด็ดขาด)
- หรือจะใช้ API หรือไลบรารี่ ทำการเชคไฟล์ให้ดีๆ ว่ามีชนิดถูกต้อง
- เชค contet-type ใน header request
- จำกัดขนาดไฟล์ รวมทั้งตรวจสอบชื่อไฟล์ดีๆ
- ไดเรคทอรี่ที่จะอัพโหลดไฟล์ขึ้นไปวาง ควรไม่มีสิทธิในการรันสคริปต์ใดๆ
- ฝั่ง server ควรติดตั้งซอฟต์แวร์ scanner เอาไว้สแกนหาไฟล์แปลกปลอมของ hacker ที่หลอกเข้ามาฝั่งตัว
- ในหน้าฟอร์ม (HTML) เปลี่ยนวิธีส่ง request จากเดิม ที่ใช้ put หรือ get ให้หันมาใช้วิธี post แทน
- และวิธีการอื่นๆ ที่ไม่ได้กล่าวถึง
+++++++++++++++
เขียนโดย โปรแกรมเมอร์ไทย thai programmer
รักกันก็กระทืบ like ชังกันอย่าด่าเยอะมันเจ็บ
.
รายละเอียดเพิ่มเติม
https://www.defensecode.com/…/web_vul…/form-file-upload.html
.
++++ 🔥 Security with code 🔥 +++
Writing a page with a form to upload a file.
... I'm going to upload.
... That file will be put on a pump server.
.
If we write server side code. Not careful, each one is... huhu.
There will be a leaking hole when the hacker sees it.
I will smile. Face is a satellite dish.
He can attack a loophole. Not so hard.
.
Which PHP language example will be a case study.
:
😉 for this way of attack
Live the ease of php that just drops a file on server instantly.
We can call that file via url to work instantly.
... Does it look easy!!!!!
.
*** Note, but if it's a programming language, some language.
Strict safety.
This kind of attack will be hard
Because programmers have to config file scripts first.
That script could be processed
:
:
But in this post, I would like to give you an example of the PHP code with the loophole.
As posted photos will be included.
:
1) HTML form page (index. html) to upload file (browser side)
2) When the user clicks upload a file... that file will be sent to server.
3) Server side uses simple PHP language (upload. php) Receive a sent file and put it in a folder somewhere in a machine such as uploads.
:
😱 which is so easy to write code.
Gonna be a loophole for hacker
Dangerous files can be uploaded to lay on server. Chill.
:
🤔 So we must prevent attack by this method.
- Must be strict about the file extensions. What type of file is prohibited (e.g. Php. Don't do it.)
- Or use API or library to check the file correctly.
- check contet-type in header request
- Limit file size and check good file name
- directory to upload file to paste should not have any script running rights.
- server side should be installed scanner software to scan for hacker foreign files that come to the side.
- In the form page (HTML), change the way to send requests from the original used put or get. Let's turn to post method instead.
- and other methods not mentioned
+++++++++++++++
Written by Thai programmer thai coder
If you love each other, you will stomp like to hate each other. Don't scold too much
.
More details.
https://www.defensecode.com/public/web_vulns/form-file-upload.html
.Translated
同時也有1部Youtube影片,追蹤數超過15萬的網紅DrTech,也在其Youtube影片中提到,Previous Video ●How to download Hyper-rom for S3 ○ https://m.youtube.com/watch?v=Kw6tSIHl3Dg Description The objective of this technique is to prov...
「html page example」的推薦目錄:
- 關於html page example 在 โปรแกรมเมอร์ไทย Thai programmer Facebook 的最讚貼文
- 關於html page example 在 GamingDose Facebook 的最佳解答
- 關於html page example 在 國立故宮博物院 National Palace Museum Facebook 的精選貼文
- 關於html page example 在 DrTech Youtube 的最佳貼文
- 關於html page example 在 Simplest possible HTML template - gists · GitHub 的評價
- 關於html page example 在 HTML Tutorial - How to Make a Super Simple Website 的評價
- 關於html page example 在 Page Plugin - Social Plugins - Meta for Developers - Facebook 的評價
html page example 在 GamingDose Facebook 的最佳解答
Facebook เปิดตัว Facebook Shops เปลี่ยนเพจธุรกิจของคุณให้เป็นร้านค้าออนไลน์
Facebook launches facebook shops. Turn your business page into an online shop.Translated
Facebook เปิดตัว Facebook Shops เปลี่ยนเพจธุรกิจของคุณให้เป็นร้านค้าออนไลน์
.
เมื่อไม่นานมานี้ Facebook ได้ทำการเปิดตัว Facebook Shops เป็นฟีเจอร์ใหม่ที่ช่วยเปลี่ยนเพจธุรกิจ Facebook และ Instagram ให้กลายเป็นหน้าร้านค้าออนไลน์ได้ เพื่อช่วยเหลือธุรกิจรายเล็กที่ได้รับผลกระทบจากการระบาของ COVID-19
.
ด้วย Facebook Shops ผู้ใช้สามารถสร้างร้านค้าธุรกิจรายเล็กบนเพจ Facebook หรือ Instagram และสร้างแคตตาล็อกรายชื่อผลิตภัณฑ์ เพื่อให้ผู้ใช้สามารถค้นหากับซื้อสินค้าได้ทันที นอกจากนี้ ฟีเจอร์มาพร้อมกับระบบ direct message ให้สามารถติดต่อกับลูกค้าโดยตรงผ่านช่องทาง Messenger, WhatsApp และ Instagram Direct พร้อมกับการตกแต่งร้านค้าอย่างสีกับรูปลักษณ์ได้ตามใจชอบ
.
นอกจากนี้ Facebook กล่าวว่ามีแผนให้ Facebook Shops สามารถใช้ฟีเจอร์ไลฟ์สด เพื่อผู้ขายนำเสนอผลิตภัณฑ์ได้ โดยระบบดังกล่าวจะเตรียมให้ใช้ใน 'ในไม่อีกกี่เดือนข้างหน้า' และระบบ loyalty programs ที่เจ้าของร้านสามารถตั้งค่ามอบรางวัลจากการซื้อผลิตภัณฑ์ให้แก่ลูกค้าในอนาคต (ยกตัวอย่าง: การให้แต้มจากการซื้อ เพื่อใช้เป็นส่วนลดในการซื้อของรอบถัดไป)
.
ที่มา: https://www.engadget.com/facebook-instagram-new-shopping-fe…
.
#GamingDose #Facebook
Facebook launches facebook shops. Turn your business page into an online shop.
.
Facebook recently launched facebook shops a new feature that helps turn Facebook and Instagram business pages into online stores to help small businesses affected by Covid-19
.
With Facebook shops, users can create a small business shop on Facebook or Instagram page and create a product listing catalogue so users can find and buy right away. Also, the feature comes with direct message system to contact customers directly via messenger, whatsapp and whatsapp and Instagram direct with shop decor in color and look as you wish.
.
In addition, Facebook says there is a plan for facebook shops to use live features for sellers to offer products. The system will be prepared in 'in the next months' and the loyalty programs system that shop owners can set up to reward from Buy products for future customers (for example: purchase points to use as a discount on next round of shopping)
.
Source: https://www.engadget.com/facebook-instagram-new-shopping-features-171051648.html
.
#GamingDose #FacebookTranslated
html page example 在 國立故宮博物院 National Palace Museum Facebook 的精選貼文
#雅集 可以說是古代文士的派對(party),筵席上有精緻美味的佳餚與文藝活動助興,出席者冠蓋雲集,舉辦者張羅各種細節、參與者盛裝出席,這種慎重、期待的心情古今相通。網站設計師為大家準備了這張特別的【清 冷枚 #春夜宴桃李園 Banquet at the Peach and Plum Garden on a Spring Evening】Leng Mei (fl. 18th c.), Qing dynasty,希望大家喜歡!
*************************
#以文會友—#雅集圖特展(2019/10/05 ~ 12/25)
陳列室:北部院區 第一展覽區 202,210,212
Friends Through Culture: A Special Exhibition of Paintings on Elegant Gatherings (05 OCT ~ 25 DEC 2019)
Gallery: 202,210,212 (Northern Branch) Exhibition Area I
中文:https://theme.npm.edu.tw/exh108/ElegantGatherings
English: https://theme.npm.edu.tw/exh108/ElegantGatherings/en/page-1.html
日本語:https://theme.npm.edu.tw/exh108/ElegantGatherings/jp/page-1.html
*************************
畫作賞析:
本幅取材自李白(701-762)〈春夜宴桃李園序〉,描寫桃李花盛開庭園中的夜間遊宴活動,畫上除了文士飲酒賦詩,還有仕女逗弄小狗以及偷喝酒和打盹的僮僕,充滿輕鬆歡愉的氣氛。此序為李白宴會上有感而發之作,勉人珍惜良辰美景並及時行樂。
冷枚是清代康熙、乾隆朝宮廷畫家,善畫人物與宮苑景色,此畫顏色穠麗,工整嚴謹,是清宮繪畫細膩華美風格的典型之例。
【Banquet at the Peach and Plum Garden on a Spring Evening】Leng Mei (fl. 18th c.), Qing dynasty
This painting is an imaginative reconstruction from Li Bai’s (701-762) "Preface to the Banquet at the Peach and Plum Garden on a Spring Evening." It shows a garden with peach and plum trees in full bloom as figures banquet and stroll at night. The scroll also depicts scholars drinking wine and composing poetry and includes such vignettes as a lady playing with a small dog and another sneaking a sip of wine as a child attendant takes a nap to the side. The scenery is filled with an atmosphere of joy and relaxation. The preface represents Li Bai’s inspiration at the banquet to encourage people to cherish the beautiful scenery and good times, enjoying them while it lasts.
Leng Mei was a court painter during the reigns of the Kangxi to Qianlong emperors who excelled at painting figures and court scenery. The opulent colors of this work and the refined brushwork make it a typical example of the beautiful detailed style of Qing court art.
html page example 在 DrTech Youtube 的最佳貼文
Previous Video
●How to download Hyper-rom for S3
○ https://m.youtube.com/watch?v=Kw6tSIHl3Dg
Description
The objective of this technique is to provide a way to link to remote long descriptions in technologies that do not have a long description feature built directly into them (e.g., longdesc) or where the feature is known to not be supported.
With this technique, the long description is provided in another location than the non-text content. This could be at another location within the same URI or at another URI. A link to that long description is provided that is immediately adjacent to the non-text content. The link can be immediately before or after the non-text content. If the description is located along with other text then put "End of description" at the end so that they know when to stop reading and return to the main content. If a "Back" button will not take the person back to the point from which they jumped, then a link back to the non-text content location is provided.
This technique was commonly used in HTML before 'longdesc' was added to the specification. In HTML it was called a D-Link because it was usually implemented by putting a D next to images and using the D as a link to the long description. This technique is not technology specific and can be used in any technology that supports links.
ExamplesExample 1: Bar chart
There is a bar chart on a Web page showing the sales for the top three salespeople.
The short text alternative says "October sales chart for top three salespeople."
Immediately after the non-text content is a small image denoting a long description. The alternate text for the image is "Long description of chart". The image links to the bottom of the page where there is a section titled "Description of charts on this page". The link points to this specific description: "Sales for October show Mary leading with 400 units. Mike follows closely with 389. Chris rounds out our top 3 with sales of 350. [end of description]"
Example 2: Bar chart - in non-HTML technology where user agent "back" is not supported for security reasons.
There is a bar chart on a Web page showing the sales for the top three salespeople.
The short text alternative says "October sales chart for top three salespeople."

html page example 在 HTML Tutorial - How to Make a Super Simple Website 的推薦與評價

If you're an absolute beginner in web development, you can learn the basics of HTML here. This video covers setting up an HTML file, ... ... <看更多>
html page example 在 Page Plugin - Social Plugins - Meta for Developers - Facebook 的推薦與評價
The Page plugin lets you easily embed and promote any public Facebook Page ... You can use the Page plugin for any Page that is not restricted, for example, ... ... <看更多>
html page example 在 Simplest possible HTML template - gists · GitHub 的推薦與評價
<p>This is an example paragraph. Anything in the <strong>body</strong> tag will appear on the page, just like this <strong>p</strong> tag and its contents. ... <看更多>