Sunday, November 29, 2015

$a_i+b_i$

Friday, November 20, 2015

[HomeMade] 闽南肉粽


清单

分量: 14个

  • 圆糯米 500g
  • 五花肉 300g
  • 莲子 28个
  • 香菇 28朵
  • 虾仁干 30g
  • 笋 100g
  • 芋头 200g

菜谱

  • 糯米淘洗干净,提前泡两个小时
  • 香菇,莲子提前泡两个小时
  • 五花肉切块,下油煸至金黄,加入鲜酱油,调味。
  • 炒米。记得调味。炒至五成熟
  • 包粽子。取粽叶而散片并列互叠,折成尖底三角形漏斗状,先倒入糯米,再放其他材料,最上边再盖上糯米,收拢粽叶两端,包成四个角的立体型。用绳子捆扎四角及中腰。每15个扎成一串。
  • 煮粽子。高压锅20分钟。
  • 食用。佐以辣椒酱。

[VA 22030] Sushi Prince


Location: 10256 Main Street, Fairfax, VA 22030

Link:  http://www.sushi-prince.com/

Rate: 80/100


Appetizer


  • Gyoza: Friend Pork Dumpling
    • Price: $5
    • Rate: 70/100




Entries

  • Uni don
    • Price: $20
    • Rate: 80/100
    • Time: 2016 Mar



  • Sashimi
    • Price: $20 ?
    • Rate: 80/100
    • Time: 2016 Mar

Saturday, November 14, 2015

Security Data Scientist Resources


Open Source Project

[Video] Machine Learning and Big Data in Cyber Security

Source: Machine Learning and Big Data in Cyber Security Eyal Kolman Technion lecture
Speaker: by yal Kolman of RSA given at Technion-Israel Institute of Technoloy, Technion Computer Engineering summer school 2014

Summary:


  • This video discusses about the challenging in applying machine learning to detect attacks. 
  • It also introduces 3 case studies of how to use machine learning in the domain of security.

Challenges

  • High cost of errors
    • If the detection generates a lot of wrong alerts, then the detection is not useful.
  • Data is not public
    • Most of the security data are private
  • Semantic gam
    • Detection is not enough
  • Evaluation difficulty
    • There are few labels
    • There are few attacks

Case Studies

  • Detect inpersonation 
    • based on users behavior
    • locations
  • Detect fraud in bank account
  • Detect malicious domain
    • Events with cookies
    • Referral

Latin Square

What it is

  • An n*n array filled with n different symbols, each occurring exactly once in each row and exactly once in each column. 

What property does it have


What's the application in security

  • use for image cipher

References

Split Keys to Multiple Machines

The objective of this post is to discuss the feasibility of splitting credentials into multiple machines.

Why to Split Key

  • The motivation is to enhance the difficulty for the attackers to steal the key. The attackers would need to compromise several machines together 
How to Split Key

  • [2] RSA

Feasibility of Splitting Key to Protect Security

  • Though the secrets are separated, the rebuilding process must occur, by necessity, on a single machine which obtains, at some point, the secret itself. In particular, if you do the reassembly on a machine which is evil (i.e., which is under the control of an attacker through some malware), then the attacker learns the SSH private key. [1]

Conclusion

  • It is not feasible to defense covert channel attack through splitting credentials to multiple machines. 

References

Friday, November 13, 2015

[VA 22030] Bollywood Bistro


Address: 3955 Chain Bridge Rd, Fairfax, VA 22030
Tag: Indian, Buffet
Rate: 80/100

Today, I went to the Bollywood Bistro with my Indian labmate. I have been to this place several times. I love the food here, especially for the rice, and Indian curry and meat. They also serve some dessert and fruits.

Today is a windy day. And we decided to eat outside the restaurant to enjoy the sunshine and wind. However, the wind was really heavy, it almost blew our table away.


Thursday, November 12, 2015

Cloud Covert Channel Attack



What it is

Co-residence threats in Cloud 

In current commercial cloud, cloud providers allow multiple users to share the physical machine rather than assigning a dedicated machine to every user. Although in theory, VMs running on the same server (i.e., ci-resident VMs) should be logically isolated from each other, malicious users can still circumvent the logical isolation, and obtain sensitive information from co-resident VMs [6].

A malicious virtual machine (VM) can extract fine-grained information from a victim VM running on the same physical machine.

Thus malicious users can try to co-locate their VMs with target VMs on the same physical server, and then exploit side channels to extract private information from the victim [5].


Types


  • Access Driven
    • The attackers program monitors usage of a shared architectural component to learn information about the key, e.g., the data cache, instruction cache, floating-point multiplier, or branch-prediction cache.
    • The attackers could be asynchronous, meaning that they do not require the attacker to achieve precisely timed observations of the victim by actively triggering the victim operation. 

Examples


  • Zhang et al. [1] demonstrate a VM can extract a private ElGamal decryption key from a co-resident victim VM running Gnu Privacy Guard (GnuPG), which is a popular software package that implements the OpenPGP email encryption standard.
  • By overloading the CPU while a victim AES encryption process is running. They managed to gain control over the CPU and suspend the AES process thereby gaining an opportunity to monitor cache access of the victim process.

Threats Of Covert Channel Attacks


How it works

The first step for the attackers is to try to achieve co-residence with the target VMs, and then conduct covert channel attacks by exploiting shared microarchitectural components such as caches.

How to achieve co-residence


  • The most straightforward approach is to use a brute-force strategy, start as many VMs as possible until co-residence is achieved.
  • [7][8] investigate how to efficiency achieve co-residency.

Approach 1: PRIME + PROBE method 


  • Step 1: 
    • Attackers create one or more eviction sets. An eviction set is a sequence of memory addresses that are all mapped by the CPU into the same cache set. 
    • The PRIME+PROBE method also assumes that the victim code uses this cache set for its own code or data.
  • Step 2:
    • The attackers prime the cache set by accessing the eviction set in an appropriate way.
    • This force the eviction of the victim's data or instructions from the cache set and brings it to a known state.
  • Step 3:
    • The attackers trigger the victim process, or passively waits for it to execute. 
    • During this execution step, the victim may potentially utilize the cashe and evict some of the attacker's elements from the cache set.
  • Step 4:
    • The attacker probes the cache set by accessing the eviction set again.
    • A probe step with a low access latency suggests that the attacker's eviction set is still in the cache.
    • Conversely, a higher access latency suggests that the victim's code made use of the cashe set and evicted some of the attacker's memory elements.
    • The attackers thus learns about the victim's internal state. 
    • The actual timing measurement is carried out by using the (unpriviledged) instruction rdtsc, which provides a hide-fidelity measurement of the CPU cycle count.
    • Iterating over the eviction set in the probing phase forces the cache set yet again into an attacker-controlled state, thus preparing for the next round of measurement.


How to defense against it

Several countermeasures have been proposed at different levels: hypervisor, guest OS, hardware and application-layer approaches.

1. Eliminating the side channels

  • Hypervisor-based approach.
    • Modify the Xen scheduler to limit the frequency in which an attacker can preempt the victim.
    • Locking cache lines to prevent preemption by an attacker and multiplexing the cache lines among VMs such that each has an access to its own.
    • Remove high resolution clock
      • Note the side-channels attacks relies on it
    • Add noise/latency
      • Periodic time-shared cache cleasing, in order to make the side channel noisy.
      • Hide the program execution time
      • Alter the timing exposed to an external observer.
        • e.g., add latency
      • Statistical multiplexing of shared resources to prevent eavesdropping.
  • Guest OS
    • Injecting noise into protected processes on L1 and L2 caches.
  • Hardware
    • Hardware design incorporates access randomization and resource partitioning.
      • e.g., avoid sharing of sensitive resources
    • Remove hypervisor, and use hardware mechanisms for the isolation of access to shared resources
Cons
  • These methods often require substantial changes to be made to existing cloud platforms, and hence are unlikely to be adopted by cloud providers any time soon.

2. Increasing the difficulty of verifying co-residence


  • Existing works show that traceroute tool can be used to decide the IP address of a VM's Dom0, which is a privileged VM that manages all VMs on a host. If two Dom0 IP addresses are the same, then the corresponding VMs are co-resident.
    • Cloud provider can prevent Dom0's IP address from being exposed to customers. so that attackers will be forced to resort to other options that do not rely no network measurements.
    • However, as more and more methods of detecting co-residence have been proposed [10-12], simply hiding Dom0's IP address is not sufficient. [9]

3. Increasing the difficulty of steal information

  • Application-level
    • Partitioning a cryptographic key across multiple VMs.
      • E.g, divide the secrets using Shamir's secret

4. Detecting the features of co-resident attacks


  • When attackers use Prime+Probe technique to extract information from the victim, there are abnormalities in the CPU and RAM utilization, system calls, and cache miss behaviors. [13][14]

5. Migrating VMs periodically

  • VM migration 
    • This approach is proposed in [4]. 
    • Pros
      • Other approaches are not suitable for immediate deployment due to the required modification to the cloud platforms, while VM migrations can be implemented immediately.

6. Using VM allocation policies to make it difficult to achieve co-residence


References
[1] Cross-VM side channels and their use to extract private keys, CCS 2012
[2] Wait a Minute! A fast, Cross-VM Attack on AES, in Research in Attacks, Intrusions and Defenses, LCNS 2-14
[3] The Spy in the Sandbox: Practical Cache Attacks in JavaScript and their Implications, CCS15
[4] Nomad: Mitigating Arbitrary Cloud Side Channels via Provider-Assisted Migration, CCS15
[5] Security Games for Virtual Machine Allocation in Cloud Computing, by Yi Han et al., in GameSec15
[6] Hey, You, Get Off of My Cloud: Exploring Information Leakage in Third-Party Compute Clouds, by Restenpart, T. et al., in CCS09
[7] A Placement Vulnerability Study in Multi-Tenant Public Clouds, by Venkatanathan Varadarajan, in UnixSecurity15
[8] A Measurement Study on Co-residence Threat inside the Cloud, by Haining Wang, in UnixSecurity
[9] Using Virtual Machine Allocation Policies to Defend against Co-resident Attacks in Cloud Computing, by Yi Han et al, in Transactions on Dependable and Secure Computing
[10] Detecting co-residency with Active Traffic Analysis Techniques, by A. Bates, in CCSW12
[11] Detecting VMs co-residency in Cloud: Using Cached-based Side Channels Attacks, by S. Yu 2013
[12] On Detecting Co-resident Cloud Instances Using Network Flow Watermarking Techniques, by A. Bates, in International Journal of Information Security, 2014
[13] Detecting malicious Coresident Virtual Machines Indulging in Load-Based Attacks, by S. Sundareswaran, in Information and Communication Security 2013
[14] An Approach with Two-stage Mode to Detect Cache-based Side Channel Attacks, by S. Yu, in ICOIN 2013

Wednesday, November 11, 2015

[Hindu] Diwali

My labmate is from Indian and he is also my good friend. So I try to learn the culture of Indian.

Today's Indian's Diwali Holiday and I want to introduce about it.
Overall, it is like Chinese's New Year!

Which day
- It is various according to the Hindu Lunisolar calendar, it is usually in October or November.

Why to celebrete
- It is also the Hindu's New Year!
- It is a festival to celebrate the triumph of light over dark and good over evil.

How to celebrate
- Lights, lamps, fireworks, music, food, decorations



Friday, November 6, 2015

反盗链 (Anti-Leech)

Reference
[1] Apache 防盗链(Apache Anti-Leech)技术的简单实现
[2]web网站防盗链技术_八种常见的防盗链方法总结


1. 判断引用地址

  • 使用 rewrite 技术实现 Apache 防盗链
  • 通过refer变量的值,判断图片或者资源是否合法
    • 缺点: refer可以被伪造

2. 使用cookie
  • 其实这种方法原理上跟方法2差不多。就是在显示“下载”链接的页面里产生一个动态值的cookie,然后在处理资源下载请求时先判断cookie里有没有正确的cookie,如果没有则返回错误提示信息。至于这个动态值如何产生,只要能逆向判断动态值是否合法的都可以,例如将当前的时间去除秒数取哈希值(也叫散列值)。如果网页程序是asp.net则更简单,可以往Session里随便存一个字符串或数字,然后在处理下载请求时先检查Session里是否存在这个字符串或数字。
    • 缺点
      • 无法使用下载工具

3. 使用动态文件名
  • 也叫动态钥匙法,当用户点击一个下载链接时,先在程序端计算一个Key(使用一定规律产生的Key,最好不要使用随机字符串例如GUID,并且这个Key必须有一定时效的),然后在数据库或Cache里记录这个Key以及它所对应的资源ID或文件名,最后让网页重定向一个新的URL地址,这个新URL地址里需要包含这个Key。当浏览器或下载工具发出下载请求时,程序先检测这个Key是否存在,如果存在则返回对应的资源数据。
  • 使用这个方法的好处是下载工具也可以下载,并且在Key失效前可以断点续传,并且可以通过Key来控制下载的线程数。
  • 使用这个方法(包括以上所有支持下载工具的方法)的缺点是:当任意一个用户下载成功之后,你的资源就会被一些下载工具列入“资源候选名单”,以后其他人在其他地方下载同样的文件时,下载工具会不断连接你的服务器,即使你的文件已经删除或者Key已经失效了,
    • 这样会造成类DDos攻击的后果,下面再介绍两个即可以让下载工具下载,又可以防止盗链的方法。

4. 擅改资源的内容
  • 一般热门的资源都是电影、mp3、较大的压缩包等,这些文件都是有很多可以插入数据的地方的,例如mp3有一个tag区,rar/zip有一个备注区,电影的内容随便一个地方,只要在下载过程当中,动态地往这些地方注入一些随机的字节(几个字节即可),就可以达到让整个文件的哈希值(即散列值、指纹值)发生改变,让从你网站下载的文件的哈希值跟别人的不一样,就可以防止下载工具主动找上门了。用这个方法配合方法6,可以达到较好的防盗链的效果。缺点是,虽然文件被修改的部分不会被“看”、“听”出来,不过多多少少让知道的人觉得不爽。另外就是如果别人把从你网站下载的文件放到其他网站,那么仍然存在下载工具主动找上门的情况(虽然实际上它下载不了内容)。


Sunday, November 1, 2015

[VA 22031] Marumen 拉面馆

评分: 70/100
Yelp 链接:http://www.yelp.com/biz/marumen-fairfax-2
价格: 拉面$12, 额外配料0.5-2不定,炸猪皮 $3.5
从昨天下午上课的时候就一直想着吃拉面,无奈昨天自己带了晚饭。今天下午迫不及待地奔去吃。
虽然这家店不是很正宗,但VA附近也没有其它拉面馆啦。面条不是很有嚼劲,并且配料很少,只加了豆芽菜,海苔片以及半个溏心蛋 (竟然还是甜的,口味有点怪啊!)。 其它配料需要自己加钱,可以加玉米,竹笋 等。汤头挺浓的,应该是猪骨汤,不油腻刚刚好。
另外一个特点就是餐前会送小吃,今天送了毛豆。我们另外还点了炸猪皮,吃起来脆脆的,有脂肪的香味,不过对我来说稍微有点辣。


餐前送的毛豆





炸猪皮




拉面








The meaning of doing research

06/17/2015
I am interning in a tech company this summer. My mentor is a very smart, humorous, and happy guy. He got his Ph.D. degree from C, one of my dream school.

I am inspired by his opinion towards technology and the meaning of pursuing Ph.D. degree.

  • It is important to understand how technology interacts with the marketplace. Technology that truly changes the way we work and live must keep both the technical and market aspects in mind.

Self-Discipline has potential to be ruined by Ph.D

04/15/2015

Today, I saw a discussion in Huaren forum [Link]

Guys there were discussing about whether the self-discipline is determined by congenital factor (先天)or by nurture (后天). It is very interesting and also surprising that many people said they have very good discipline before they enter the Ph.D. program! But when they enter the Ph.D. program, they suffer a lot and become to have procrastination (拖延症).

The reasons that they tend to have procrastination after entering the Ph.D. program are
  • Outside the Ph.D. program, everything has a very clear goal and if you work toward goal, you can see you make progress step by step. But things are different in Ph.D. program, you need to find a topic by yourself, and it is not easy to envision the outcome.
  • Someone said in the forum that the motivation of self-discipline is "I am good at something, if I keep working on this, I will be much better than anyone else".
  • If you have no positive feedback, it is easy for you to give up.
  •  People around you are very excellent, and you found no matter what you do, you cannot catch up with them. As a consequence, you feel upset. 
  • My comment: Win-win will be better. Learn excellent qualities from others! I don't think this is good reason for upset to come from.

Therefore, in order to be a productive Ph.D. student, there are some actions we can take

  • Do something you are good at. For example, I am working on algorithm but I am not good at making proof. Therefore, a better way for me is to find some application for algorithms and do some simulation.
  • Find short goal for yourself. Divided the big goals into small pieces and complete each one step by step.
  • Someone said self-discipline is like muscle. If you not keep training, the muscle will atrophied (萎缩). Lol
  • Thinking in a different way. Many successes is due to the cumulative acquisition of knowledge.

If you are hurt by the Ph.D. life and would like to strike a way out to get a different life, here are some suggestions
  • You may be procrastinated because you are doing something that you are not interested at all. If it were this case, then I encourage to find something you really like. 

What qualities characterize a great PhD student?


"Four indispensable qualities"
0. intelligence
1. curiosity
2. creativity
3. discipline and productivity

"Nice to have but not essential"
4. ability to tech/ communicate with an audience
5. ability to communicate with peers

Amy Morin: 13 Things Mentally Strong College


Here are the 13 things mentally strong college students don’t do:
  1. Waste Time Feeling Sorry for Themselves
    Many of life’s problems and sorrows are inevitable, but feeling sorry for yourself is a choice. Whether you’re drowning in student loan debt, or you’re struggling to pass Advanced Calculus, indulging in self-pity won’t fix your problems. If you’re prone to feeling sorry for yourself when the going gets rough, train your brain to exchange self-pity with gratitude. Mentally strong people don’t waste their time and energy thinking about the problem, instead they focus on creating a solution.
  2. Give Away Their Power
    It can be tempting to blame other people for when we face problems and experience uncomfortable emotions. Thinking things like, “My professor makesme feel bad about myself,” however, gives others power over you. Take back your power by accepting full responsibility for how you think, feel, and behave. Empowering yourself is an essential component to building mental strength and creating the kind of life you want to live.
  3. Shy Away From Change
    Although we feel safest when we stay within our comfort zones, avoiding new challenges serves as the biggest obstacle to living a full and rich life. Acknowledge when you’re avoiding change simply because you want to escape the discomfort associated with doing something new. Commit to facing those emotions head-on. The more you practice tolerating uncomfortable emotions, the more confident you’ll become in your ability to tolerate the distress that may be necessary to reach your full potential.
  4. Waste Energy on Things They Can’t Control
    So often, we worry about all the wrong things. Rather than focus on preparing for the storm, we waste energy wishing the storm wouldn’t come. If we invested that same energy into the things we do have control over, we’d be much better prepared for whatever life throws our way. Pay attention to the times when you’re tempted to worry about something you can’t control — like your roommate’s GPA or how the job market is going to look when you graduate — and devote that energy into something more productive.
  5. Worry About Pleasing Others
    Although a lot of people say, “I don’t care what other people think,” that’s often a defense mechanism meant to shield them from the hurt and pain associated with rejection. The truth is, most of us want to be liked and we want those around us to be happy. But choosing a major based on what your parents want you to do, or accepting an internship that a professor wants you to take, can interfere with your ability to create your own path in life. Doing things that won’t be met with favor takes courage, but living a truly authentic life requires you to live according to your values, even when your choices aren’t popular.
  6. Fear Taking Calculated Risks
    We make dozens – if not hundreds – of choices every day with very little consideration of the risks we’re taking. And in college, calculating those risks fall on your shoulders for the first time. It’s up to you decide everything from what you’re going to do on Friday night to what career path you’re going to take. Often we base those choices on emotion, rather than the true level of risk. Making decisions based on your level of fear isn’t an accurate way to calculate risk because emotions are often irrational and unreliable. You don’t get to be extraordinary without taking risks, but it’s important to learn how to accurately calculate those risks so you can make choices with confidence.
  7. Dwell on the Past
    While reflecting on the past and learning from it is a helpful part of building mental strength, ruminating can be harmful. Whether you were bullied in junior high, or still can’t believe you didn’t pass that class last semester, dwelling on it will only hold you back. Although moving forward can be hard – especially if you’ve endured your share of misfortune – it’s a necessary step to becoming your best self.
  8. Make the Same Mistakes Over and Over
    It’d be nice to learn enough from each mistake that we’d be guaranteed to never repeat that same mistake twice. But, how many times have you said, “I’ll never do that again,” only to find yourself right back at it a few days later. Learning from our mistakes requires humility and a willingness to look for new strategies to become better. Mentally strong people don’t hide their mistakes or make excuses for them. Instead they turn their mistakes into opportunities for self-growth.
  9. Resent Other People’s Success
    No matter where you go to college, you’re bound to be surrounded by people who are prettier, smarter, wealthier, and more successful. Focusing on all the things other people have however, will interfere with your ability to reach your goals. When you’re secure in your own definition of success, you’ll stop resenting other people for obtaining their goals and you’ll be committed to reaching your dreams.
  10. Give Up After Failure
    It’s normal to feel embarrassed, discouraged, and downright defeated when your first attempts don’t work. From a young age, we’re often taught that failure is bad, but it’s nearly impossible to succeed if you never fail. Mentally strong people view failure as proof that they’re pushing themselves to the limits in their efforts to reach their full potential.
  11. Fear Alone Time 
    In today’s fast paced world, obtaining a little quiet time often takes a concerted effort. Many people avoid silence and solitude because the lack of activity feels uncomfortable. But taking time for yourself is an essential component to building mental strength. It’s essential to create opportunities to be alone with your thoughts so you can reflect on your progress and consider your goals for the future.
  12. Feel the World Owes Them Anything
    It’s easy to get caught up in feeling a sense of entitlement. But waiting for the world — or the people in it — to give you what you think we’re owed isn’t a helpful life strategy. If you’re busy trying to take what you think you deserve, you won’t have any time to focus on all that you have to give. And everyone has gifts that can be shared, regardless of whether they’ve gotten a “fair deal” in life.
  13. Expect Immediate Results
    We often grow so accustomed to our “no lines, no waiting” world, that our brains begin to believe that everything should happen instantaneously. But self-growth develops at more of a snail’s pace, rather than at lightning speed. Whether you’re trying to lose weight or you want to improve your self-confidence, slow and steady wins the race and expecting immediate results will only lead to disappointment. Mentally strong people know that true change takes time and they’re willing to work hard to see results.
The good news is, everyone has the ability to build mental strength. But to do so, you need to develop self-awareness about the self-destructive thoughts, behaviors, and feelings that prevent you from reaching your full potential. Once you recognize areas that need work, commit to mental strength exercises that will help you create healthier habits and build mental muscle.

Dior 变色唇膏










成分

  • 芒果和丝瓜 (loofah) 萃取物

效果

  • 滋润,色号很美。不会像口红那么隆重,比较自然,适合日常装扮。
  • 不足是颜色不持久,会掉色。

评分

     ★